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 |
Mondeo
Constraint Violating Yak Guru
287 Posts |
Posted - 2014-04-30 : 15:27:17
|
I need to do something like the following within a stored procc = SELECT count(jobid)FROM tblJobsWHERE JobStatusId IN (2,3,6,7)if (c > 0){// DO THIS}Could anyone help me with the syntax?Many Thanks |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-04-30 : 15:34:10
|
if exists (SELECT * FROM tblJobs WHERE JobStatusId IN (2,3,6,7))begin...endTara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|