They say that lazy people take most pains!
I had seen a syntax for an INSERT statement that went something like:-
Where Sp_Y returns a recordset.
I was wondering if there were any other short cuts like that.
I try to write my SPs so that they have multiple uses with the aim of reducing instances where I have a lot of very similar SPs.
In this particular case my stored procedure has a number of optional arguments. If all are specified then a single record will be returned, otherwise multiple records will result.
I'll chicken out and use OUPUT variables and put IF @@ROWCOUNT >1 or something similar.