?
Solved

a select statement to pass parameters to a stored procedure

Posted on 2006-05-30
2
Medium Priority
?
586 Views
Last Modified: 2008-03-10
Hi ...

I call a stored procedure by using 'execute' into an another stored procedure.
I would like pass some parameters with a select statement.

Something like that :

exec stp_order_insert   (select param1,param2 from table3 where x=@param3 and Y=@Param4)

My stp_order_insert needs 2 parameters are integers.
I think my select statement returns a string and that's why my execute failed .









0
Comment
Question by:PROMISYS
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1200 total points
ID: 16788322
declare @param1 int
declare @param2 int
select @param1 = param1,@param2 = param2 from table3 where x=@param3 and Y=@Param4

exec stp_order_insert   @param1, @param2
0
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 800 total points
ID: 16788323
declare @param11 int,@param21 int
select @param11 = param1,@param21 =param2 from table3 where x=@param3 and Y=@Param4
exec stp_order_insert @param11, @param21
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Microsoft provides a rich set of technologies for High Availability and Disaster Recovery solutions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question