hi!
i have a stored procedure with two SELECT and IF statements, like this:
CREATE PROCEDURE dbo.Proc1
@a bit= 1
, @b-2 bit= 0
AS
IF @a= 1 SELECT * FROM dbo.TableA
IF @b-2= 1 SELECT * FROM dbo.TableB
GO
depend on the values of variables i can get 0, 1, 1, or 2 tables as the result of the query.
this SP is used by an application, what need to know, which is the result-table.
is there any way to give name to the result-table?
thx for the answers,
bye
G