peggasus88
Technical User
Hi,
Newbie here. Can someone please show me how to SELECT a value and RETURN that value in the same stored procedure?
My stored procedure:
Alter PROCEDURE spGetQuarter_byDate
@Date datetime,
@Quarter varchar(20) Output
AS
Set @Quarter = (SELECT Quarter FROM Quarters WHERE @Date BETWEEN StartDate AND EndDate)
RETURN @Quarter
I'm getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the varchar value '2002 Q2' to a column of data type int.
I have no idea where the 'data type int' is coming from since I have no ints in my table!
Please help. I don't want to be thinking about this when I'm watching Star Wars!
~*Peggy*~
Newbie here. Can someone please show me how to SELECT a value and RETURN that value in the same stored procedure?
My stored procedure:
Alter PROCEDURE spGetQuarter_byDate
@Date datetime,
@Quarter varchar(20) Output
AS
Set @Quarter = (SELECT Quarter FROM Quarters WHERE @Date BETWEEN StartDate AND EndDate)
RETURN @Quarter
I'm getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the varchar value '2002 Q2' to a column of data type int.
I have no idea where the 'data type int' is coming from since I have no ints in my table!
Please help. I don't want to be thinking about this when I'm watching Star Wars!
~*Peggy*~