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 |
|
sid81
Starting Member
1 Post |
Posted - 2007-09-13 : 01:13:21
|
| How can we determine in a stored procedure whether a select statement is returing some data rows or not and act accordingly to it in the same store procedure. i.e. do some other action if the data returned by the select is null. Is there any way?? |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-09-13 : 01:51:54
|
have a look at COALESCE in books online. it will give you the first arg of N args that is not null. elsasoft.org |
 |
|
|
mohit_sme
Starting Member
13 Posts |
Posted - 2007-09-13 : 15:39:37
|
| There are many solutions to this, you can use IF Exists OR @@RowCount to check if your SQL statement is returning any row.ThanksMohit Nayyarhttp://mohitnayyar.blogspot.com |
 |
|
|
|
|
|