Re: Loading a variable

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

From: Alley (anonymous_at_discussions.microsoft.com)
Date: 01/12/05


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.
>> >
>> >
>> >.
>> >
>
>
>.
>



Relevant Pages

  • Re: Table lookup query
    ... The suggestion should work, the only ... problem perhaps being that if anything is stored as CHAR, not VARCHAR, ... Steve Kass ...
    (microsoft.public.sqlserver.programming)
  • Re: Unsure why VBA thinks dates entered are greater than Now() - when they are not?
    ... Thx for the explanation, Marshall. ... So I took banem2 up on his suggestion to encapsulate the textbox ... If the Format is the kind used for a date/time, ...
    (comp.databases.ms-access)
  • Re: Do my DNS MX setting is all right?
    ... thx for reply, here are my new setting on my Main DNS zone setting. ... still not too understand the MX and POP relevent. ... This screen capture are now I correction the setting from Ace's suggestion, ... >> the CNAME to post to the www.w2k3test.com?? ...
    (microsoft.public.windows.server.dns)
  • RE: Array Formula help pls.
    ... "klam" wrote: ... > Thx a mint for your suggestion. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Problem with date format
    ... Thanks for the suggestion but, I have already managed to convert the varchar ... to a date, but its the date format thats causing the problem, the code you ... I know how to convert a char format (dd/mm/yyyy) top a date, ...
    (microsoft.public.sqlserver.programming)