需要使用sp值更新tempororary表中的列

需要使用sp值更新tempororary表中的列

问题描述:

需要使用sp值更新tempororary表中的列



我有sp,

因为我有临时表,

i需要更新临时表中的列。

在这个sp中我在内部使用另一个sp。

那个sp给出了一些价值。

我需要应用该值来更新列在临时表中





这是我的代码

在我的sp中我使用以下查询进行更新临时表栏



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

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





如何拨打sp更新栏目



如何实现这一目标?



先谢谢



How to call the sp for updating the column

How to acheive this?

Thanks in Advance

您正在将parameters_collection_id设置为字符串值,这当然不是什么你想要的。



假设你的SP返回一个INT,你可以这样做:

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:
DECLARE @returnVal INT
EXEC @returnVal = CADEBILL.get_next_parameters_collection_id
-- now update temp table
UPDATE #quote_detail
SET parameters_collection_id = @returnVal