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 |
|
Zoroaster
Aged Yak Warrior
702 Posts |
Posted - 2007-08-21 : 11:04:16
|
| Is there a way to select the results of an SP into a variable. For example:DECLARE @X varchar(1000)SELECT @X= sp_who2How do I do this? |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-21 : 11:08:28
|
This maybe?create table #temp (data varchar(200))insert #tempexec spwho2select @x = data from #temp E 12°55'05.25"N 56°04'39.16" |
 |
|
|
sbalaji
Starting Member
48 Posts |
Posted - 2007-08-22 : 00:28:07
|
| In the above eg:Number of column in the temp table should be equal to the output columns provided in the sp |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-08-22 : 01:21:55
|
quote: Originally posted by sbalaji In the above eg:Number of column in the temp table should be equal to the output columns provided in the sp
Yes. In addition to datatypes MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|