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 |
|
misk
Starting Member
2 Posts |
Posted - 2011-06-06 : 02:34:06
|
Hello,I have problem when the select return nothing(no data to select)Find in below script if there is no data to return the "@ActionType" will assigned to nothing. and the IF statement will not work correctly.Any help please. DECLARE @ActionType INTSELECT TOP 1 @ActionType = ActionType FROM ...IF @ActionType != 1BEGIN ...END |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-06-06 : 03:15:39
|
[code]IF @ActionType != 1 OR @ActionType IS NULL[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
misk
Starting Member
2 Posts |
Posted - 2011-06-06 : 04:06:17
|
| Thanks khtan |
 |
|
|
|
|
|