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 |
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2005-12-19 : 03:04:30
|
| I have an sp and in the sp I want to do the following@mycount="select count(id) from users where source=5if @mycount is an even number then beginexecute an sql statementendcan someone help me with the exact syntax for this? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-19 : 03:07:58
|
| EDIT:Thats wrong link@mycount="select count(id) from users where source=5if @mycount %2 =0beginexecute an sql statementendMadhivananFailing to plan is Planning to fail |
 |
|
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2005-12-19 : 03:13:46
|
| I get a page cannot be displayed by that link |
 |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2005-12-19 : 03:48:57
|
| select @mycount = count(id) from users where source=5if @mycount %2 = 0 beginexecute an sql statementend |
 |
|
|
|
|
|