Re: Loading a variable
From: Alley (anonymous_at_discussions.microsoft.com)
Date: 01/12/05
- Next message: Hugo Kornelis: "Re: TRICKY SQL"
- Previous message: John Bell: "Re: Security of DB files (mdf,ndf,ldf)"
- In reply to: Adam Machanic: "Re: Loading a variable"
- Next in thread: Brad Feaker: "RE: Loading a variable"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 Jan 2005 12:50:57 -0800
Thx. I think the suggestion below will work for me.
>-----Original Message-----
>Maybe you can post a sample of what kind of data is your
table and what
>you're expecting as output..?
>
>
>--
>Adam Machanic
>SQL Server MVP
>http://www.sqljunkies.com/weblog/amachanic
>--
>
>
>"Alley" <anonymous@discussions.microsoft.com> wrote in
message
>news:00d901c4f8d7$e57b32d0$a301280a@phx.gbl...
>> Sorry I want the variable to be char or varchar so
that I
>> can email out the results using xp_sendmail.
>>
>> >-----Original Message-----
>> >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.
>> >
>> >
>> >.
>> >
>
>
>.
>
- Next message: Hugo Kornelis: "Re: TRICKY SQL"
- Previous message: John Bell: "Re: Security of DB files (mdf,ndf,ldf)"
- In reply to: Adam Machanic: "Re: Loading a variable"
- Next in thread: Brad Feaker: "RE: Loading a variable"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|