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 |
|
hahsm
Starting Member
10 Posts |
Posted - 2009-02-10 : 03:41:51
|
| How we check for null cursor variablesfor exampleFetch next from cursor into @a, @bWhile @@Fetch_status <> -1--How to check whether @a is null or not--Do somethingFetch next from cursor into @a, @bend |
|
|
jbp_j
Starting Member
24 Posts |
Posted - 2009-02-10 : 03:49:53
|
| HI, Fetch next from cursor into @a, @bWhile @@Fetch_status <> -1if(@a is null ) begin--Do somethingend Fetch next from cursor into @a, @bend |
 |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-02-10 : 10:02:04
|
| you may also want to use IF ISNULL(@a,'') = '' |
 |
|
|
|
|
|