Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
salvjr
Starting Member
2 Posts |
Posted - 2013-06-14 : 16:15:20
|
I want to thank everyone in advance for your assistance in this matter. I'm running MS SQL 2k. In a database called consumer there is a table called consumerdata. In the telephone column there are phone numbers, but at times some fields are null and some just contain a zero 0. I'm trying to replace the rows that contain only a 0 with nothing, but I don't want to effect a row of data that happens to contain a zero such as 9544801001 as that has to be left untouched. And ideas for a t-sql script? Also I should mention there are 160 million rows :(Thanks everyone... Sal |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2013-06-14 : 16:49:14
|
[code]UPDATE ConsumerDataSET PhoneNumber = NULLWHERE PhoneNumber = '0'[/code] |
|
|
salvjr
Starting Member
2 Posts |
Posted - 2013-06-15 : 15:01:25
|
You are awesome! Thank you so much! Works perfectly!! |
|
|
kittu
Starting Member
1 Post |
Posted - 2013-06-18 : 03:51:08
|
For each maker, list in the alphabetical order with "/" as delimiter all the types of products he produces.Deduce: maker, product types' list · Help topics: GROUP BY clause COALESCE operator REPLACE function Getting summarizing valuesanswer my query |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-06-18 : 03:54:56
|
quote: Originally posted by kittu For each maker, list in the alphabetical order with "/" as delimiter all the types of products he produces.Deduce: maker, product types' list · Help topics: GROUP BY clause COALESCE operator REPLACE function Getting summarizing valuesanswer my query
DOnt hijack threadsPost as a new thread if you've a questionIn any case we wont hlep with homework/assignments unless you try it out yourself------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|