I have the following stored procedure:
CREATE PROCEDURE spTest
AS
DECLARE @var1 as INT
Select @var1 = 12
SELECT UserID, Name from Users
GO
If I execute this stored procedure using “SQL Query Analyzer” everything seems to be OK (I’ll obtain the fields: UserdId, Name and var1), but if I try to make an report (with Crystal Reports) using this stored procedure, I’ll have available only the UserdId, Name fields (without “var1”). I could have this field (“var1”) available in my report whether “spTest” will be as:
CREATE PROCEDURE spTest
AS
DECLARE @var1 as INT
Select @var1 = 12
SELECT “Field1” = @var1, UserID, Name from Users
GO
Is there another solution for this problem (I mean to have available in my report the “var1” field also) ?
Any idea will be appreciated.
Best regards,
Doru
CREATE PROCEDURE spTest
AS
DECLARE @var1 as INT
Select @var1 = 12
SELECT UserID, Name from Users
GO
If I execute this stored procedure using “SQL Query Analyzer” everything seems to be OK (I’ll obtain the fields: UserdId, Name and var1), but if I try to make an report (with Crystal Reports) using this stored procedure, I’ll have available only the UserdId, Name fields (without “var1”). I could have this field (“var1”) available in my report whether “spTest” will be as:
CREATE PROCEDURE spTest
AS
DECLARE @var1 as INT
Select @var1 = 12
SELECT “Field1” = @var1, UserID, Name from Users
GO
Is there another solution for this problem (I mean to have available in my report the “var1” field also) ?
Any idea will be appreciated.
Best regards,
Doru