79722387

Date: 2025-08-01 10:55:26
Score: 1.5
Natty:
Report link

There is a way to check it outside of the SP.

If you know columns of the result set of your SP, you can check it by using a temp table as follow:

First you need to create the temp table with columns same as the result set of the SP:

Create Table #TmpTb(Col1 varchar, Col2 Int, ...);

Insert Into #TmpTb Exec SP_Name parameters;

IF NOT Exists (Select * from #TmpTb)

Begin

-- the SP returns no row!

End

Reasons:
  • Blacklisted phrase (0.5): check it out
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: gyousefi