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 |
|
joelseverich
Starting Member
34 Posts |
Posted - 2009-02-12 : 16:34:59
|
| hi thereis there a way to update all Null values with A Different valueex. I have a Column (Bit) and i want to set all null values to falseI tried to do this UPDATE Table SET Col=0 WHERE Col=NULLbut it doesn't work , would please help me |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-02-12 : 16:35:28
|
| UPDATE Table SET Col=0 WHERE Col is NULL |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-12 : 16:37:06
|
| [code]UPDATE Table SET Col = Coalesce(Col,0)[/code] |
 |
|
|
joelseverich
Starting Member
34 Posts |
Posted - 2009-02-12 : 16:39:21
|
| thanks a lot |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-12 : 20:28:31
|
quote: Originally posted by joelseverich thanks a lot
the reason why your query not worked is because NULL is not stored as a value. so operators like =,>,<,...wont work with NULL under default settings. if you want NULL to be considered as value, you need to alter ANSI NULL settings |
 |
|
|
|
|
|