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 |
|
missMac
Posting Yak Master
124 Posts |
Posted - 2009-06-18 : 05:05:50
|
| Hello,whats wrong with this code, am trying to see if a value is null ?MMdeclare @country varchar(max)set @country = nullif @country = nullbeginprint 'I love Sally with all my heart'end |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-06-18 : 05:06:42
|
if @country is null No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-06-18 : 05:07:09
|
| if @country is nullMadhivananFailing to plan is Planning to fail |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-06-18 : 05:07:27
|
MadhivananFailing to plan is Planning to fail |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-06-18 : 05:08:01
|
In case of NULL values you should always use IS NULL or IS NOT NULL. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|