December 4, 2012 at 6:01 am
Hi SSC Team,
i have created a stored procedure with a "table variable" in it,
inserted some records into table variable based on some conditions.
and my requirement is :
i have another trigger, i want to use the data available in table variable
How it is possible.
Please Help
December 4, 2012 at 6:12 am
Minnu (12/4/2012)
Hi SSC Team,i have created a stored procedure with a "table variable" in it,
inserted some records into table variable based on some conditions.
and my requirement is :
i have another trigger, i want to use the data available in table variable
How it is possible.
Please Help
A table @variable will only hold is value for the session its in.
Rather create a #temp table which you can use in your other 'trigger' then drop it after you have finished with it.
December 4, 2012 at 6:39 am
using a stored procedure inserted records in to a #Temp_Table.
how to retieve the data in a Trigger
am using below
#Temp_Table
----------------------
Id | Name
----------------------
101Paint
102Walls
103Furn
----------------------
Trigger:
Create trigger Trigger_Name
(
---
---
)
EXEC Stored_procedure @ID
select * from #temp_table
--
But it is not working
Syntax..Or query...
.Plz
December 4, 2012 at 6:45 am
Don't think you can create a trigger on a temp table:
see this post
December 4, 2012 at 6:50 am
Sorry for asking,
my requirement is:
i've to call the stored procedure based on "id" and get the corresponding Name from the temp table.
Please suggest
December 4, 2012 at 6:54 am
Minnu (12/4/2012)
Sorry for asking,my requirement is:
i've to call the stored procedure based on "id" and get the corresponding Name from the temp table.
Please suggest
wouldn't that be a simple select?
SELECT name from #temp where ID = @param
am i misreading the quesiton, or is there more to it than that?
Lowell
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy