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 |
shantanu88d
Starting Member
35 Posts |
Posted - 2011-03-14 : 06:28:51
|
Is there any way to store results of a query directly into an array in sql server 2005??e.g I want to do something like thisdeclare @var as varchar(500)@var = select * from anytableis this possible? |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-03-14 : 07:12:10
|
No. But you can declare @var as a table variable and insert into itINSERT INTO @varSELECT <columns> fron anyTable.JimEveryday I learn something that somebody else already knew |
 |
|
shantanu88d
Starting Member
35 Posts |
Posted - 2011-03-14 : 08:03:23
|
Hey, thanks for that. Tried it already and worked !! Thank you |
 |
|
|
|
|