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 |
|
aikman
Starting Member
22 Posts |
Posted - 2012-03-13 : 09:08:51
|
| Hi,Im new to sql transacting, and want some help.Im trying to count one colum and if it's 2000 or less rows I would like to get an error. this is my code that doesn't work:SELECT COUNT(*)as t from GUID if (t is <= 2000) Raiserror ('test',16,1)thankshakan |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-03-13 : 09:12:32
|
[code]if (select count(*) from GUID) <= 2000begin Raiserror('test',16,1)end[/code] No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
aikman
Starting Member
22 Posts |
Posted - 2012-03-13 : 09:15:22
|
| thank you very much |
 |
|
|
|
|
|