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!

procedure

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
hi friends

when i try to send parameter with arthematics expressions its give error like this

execute myprocedure @name,@parameter1 * @parameter2
when i send any arthematics expression it give

thanks

 

A stored procedure cannot accept expressions as parameters. Declare another parameter to hold the result of the arithmetic expression and send that parameter to the stored procedure.

-- define data type needed
Declare @parameter3 Decimal(18,4)

-- evaluate the expression and assign to @parameter3
Set @parameter3 = @parameter1 * @parameter2

-- call SP using @parameter3
execute myprocedure @name, @parameter3 Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top