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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 how can i frame this queries in single query

Author  Topic 

satish.gorijala
Posting Yak Master

182 Posts

Posted - 2009-02-05 : 03:30:20
Update SGX_TBL_ZipCodeBreakdown Set Asian=0 where Asian is null
Update SGX_TBL_ZipCodeBreakdown Set Hawaii=0 where Hawaii is null
Update SGX_TBL_ZipCodeBreakdown Set Twoplus=0 where Twoplus is null
Update SGX_TBL_ZipCodeBreakdown Set Hispanic=0 where Hispanic is null

Can i frame this update queries in single statement. The table contains 2.5 crore records. Is is fesible by writing query in sinlge statement

G. Satish

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-02-05 : 03:31:33
What is "crore"?
I know Lakh is 100,000 (100 thousand).



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-02-05 : 03:33:29
[code]UPDATE SGX_TBL_ZipCodeBreakdown
SET Asian = COALESCE(Asian, 0),
Hawaii = COALESCE(Hawaii, 0),
TwoPlus = COALESCE(TwoPlus, 0),
Hispanic = COALESCE(Hispanic, 0)
WHERE Asian IS NULL
OR Hawaii IS NULL
OR TwoPlus IS NULL
OR Hispanic IS NULL[/code]


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

matty
Posting Yak Master

161 Posts

Posted - 2009-02-05 : 04:48:10
crore is ten million
Go to Top of Page

satish.gorijala
Posting Yak Master

182 Posts

Posted - 2009-02-05 : 04:49:15
crore is nothing but 100 lakhs
quote:
Originally posted by Peso

What is "crore"?
I know Lakh is 100,000 (100 thousand).



E 12°55'05.63"
N 56°04'39.26"




G. Satish
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-02-05 : 05:01:48
Great!
Did my suggestion work for you?



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-02-05 : 06:32:38
insight into indian numeric system
http://en.wikipedia.org/wiki/Indian_numbering_system
Go to Top of Page
   

- Advertisement -