Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Mits
Starting Member
48 Posts |
Posted - 2008-11-19 : 05:28:38
|
I would like to return a value from a stored procedure inside a stored procedure.sp1 Calls sp2sp2 has Select MyValue from MyTable - I want to user MyValue in SP1I could have easily achieved this using output parameter but my problem is i cannot change sp1 at all.Is this possible to do this?Mits |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-11-19 : 05:31:44
|
You can't change SP1 at all?Have you tried using a LOOPBACK linked server and OPENRWOSET?Have you triedCREATE #Temp TABLE (i INT)INSERT #Temp EXEC SP1SELECT * FROM #Temp E 12°55'05.63"N 56°04'39.26" |
|
|
Mits
Starting Member
48 Posts |
Posted - 2008-11-19 : 05:55:10
|
Thanks Peso for a quick reply and it works like magic!! |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-11-20 : 02:58:45
|
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/11/26/select-columns-from-exec-procedure-name-is-this-possible.aspxMadhivananFailing to plan is Planning to fail |
|
|
|
|
|