Click here to Skip to main content
15,895,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Need to update the column in tempororary table using sp value

I am having sp,
In that i have temporary table,
i need to update the column in temporary table.
In this sp i am using another sp internally.
That sp gives some value.
I need to apply that value for updating the column in temporary table


Here is my code
in my sp i am using the below query for updating the temporary table column

SQL
update #quote_detail set parameters_collection_id = 'EXEC CADEBILL.get_next_parameters_collection_id'  


How to call the sp for updating the column

How to acheive this?

Thanks in Advance
Posted
Updated 16-Apr-15 8:23am
v2
Comments
Maciej Los 16-Apr-15 15:34pm    
Not enough information... Note, that we can not read in your mind or direct from your screen. You need to provide more details...

1 solution

You are setting parameters_collection_id to a string value, which of course is not what you want.

Assuming your SP returns an INT you can do this:
SQL
DECLARE @returnVal INT
EXEC @returnVal = CADEBILL.get_next_parameters_collection_id
-- now update temp table
UPDATE #quote_detail
SET parameters_collection_id = @returnVal
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900