Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute procedure problem

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
hi all
i have problem like this
DECLARE @X NUMERIC(10),@Y NUMERIC(10)
SET @X=30
SET @Y=4
execute myproc 1000,@x+@y

i gave error
Server: Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'SELECT'.


 
Try

DECLARE @X NUMERIC(10),@Y NUMERIC(10)
SET @X=30
SET @Y=4
SELECT @X = @X + @Y

execute myproc 1000, @x

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top