Re: Loading a variable

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 01/12/05


Date: Wed, 12 Jan 2005 13:37:12 -0500

Maybe you're looking for:

select *
into #anothertemp27
from temp27

?

Can you explain what you'd expect the variable to contain?

-- 
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Alley" <anonymous@discussions.microsoft.com> wrote in message
news:0d4f01c4f8d3$dd29d270$a601280a@phx.gbl...
> Let's say I have a simple three column table, temp27,
> with a couple of rows in sql server 2000.
>
> How can I load "select * from temp27" into a variable.  I
> am looking to do something like
>
> set @variablename = exec ('select * from temp27')
>
> but cannot get anything to work.  Any tips would be
> appreciated.


Relevant Pages