
July 23rd, 2003, 11:29 AM
|
|
Junior Member
|
|
Join Date: Jul 2003
Posts: 16
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
sql as variable or paramenter
Lets say I do a Remote Procedure Call. So there is Server1 and Server2... How do I pass the results of a select statement as a parameter over to another stored procedure so it can use it...
I really am going to need a short example as I don't have any clue and I need to see what is being done. I can't find examples of this anywhere. The example can be as simple as this (although my statements are going to be COMPLETELY botched cause I have NO IDEA what the statements should look like, but you should be able to follow.
Create procedure procedure1 as
declare @thevariable
select * into @thevariable from tbl
exec procedure2 @thevariable
create procedure procedure2 as
select * from @thevariable
Something to the liking... something simple! If anyone could do that for me oh my god that would make my LIFE!!!!!!!! You have no idea how long I've been trying to figure out ways to approach this project and if something like this would work... EVERYTHING WOULD BE AMAZING!
|