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 |
|
mnymoen
Starting Member
2 Posts |
Posted - 2008-08-07 : 10:35:11
|
| What is the best way to call a stored procedure from within another stored procedure based on the result of a select statement. For example.I would like to call the sproc "sp_test" only if"select count(*) from test" is greater than 1I cannot figure out how to do that with case statementsAny help would be greatly appreciated |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-07 : 10:37:33
|
| If exists(Select * from test)EXEC procedure_name .........MadhivananFailing to plan is Planning to fail |
 |
|
|
mnymoen
Starting Member
2 Posts |
Posted - 2008-08-07 : 10:41:36
|
| Thanks. For some reason I didn't think I could use if statements. |
 |
|
|
|
|
|