[thelist] SET with stored proc

Michael Pack michaelpack at wvdhhr.org
Thu Jul 10 14:53:12 CDT 2008

Hi all, trying to run this in query analyzer (SQL Server 2k)  and can't
assign the result set of the SP to the variable. Any suggestions?

It works fine via the select statement, see commented line...... just
not with a SP........

DECLARE @intNewQTY int

SET @intNewQTY = spReturnQTY 18

--SET @intNewQTY = (SELECT prd_id FROM product WHERE prd_id =  18)


Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near '18'.

error at 


More information about the thelist mailing list