Re: Simple merging question...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bonj (benjtaylor)
Date: 10/17/04


Date: Sun, 17 Oct 2004 01:42:10 +0100

I believe you can do

select c1, c2 into mergedtable
from x
union
select c1, c2 from y

"Nazeer Oasis" <NazeerOasis@discussions.microsoft.com> wrote in message
news:87F95C11-7D83-4BCA-A0C6-964384E4DC35@microsoft.com...
> Something like this..?
>
> SELECT * INTO MergedTable FROM
> (SELECT c1, c2 FROM x
> UNION
> SELECT c1, c2 FROM y) Merged
>
> -------------------
> Nazeer
> Dimensions India
> -------------------
>
> "Mr Sandman" wrote:
>
>> Ok, newbie here... how do I merge two sql tables using query analyzer?
>>
>> This seems like it'd be so simple, yet I keep generating errors. I have
>> two
>> "select into" statements pulling from different locations, they each
>> produce
>> a table of output. I need to take those two tables of output and combine
>> them. They have identical columns/fields.
>>
>> What command or function should I be looking for? THANKS!!!
>>
>>
>>



Relevant Pages

  • Re: Was Maclellan a southern sympathizer?
    ... sherman was in command of the encampment. ... river campaign the union destroyed what they couldn't carry off. ... take the the revolutionary general natanial greene, he lost every battle he ... arrival and burnsides non-arrival saved lee ...
    (sci.military.naval)
  • Re: Was Maclellan a southern sympathizer?
    ... sherman was in command of the encampment. ... His defeats helped Confederate morale. ... river campaign the union destroyed what they couldn't carry off. ... take the the revolutionary general natanial greene, he lost every battle ...
    (sci.military.naval)
  • Re: Select....Union problem with Memo field
    ... the command had worked perfectly well until the change. ... 'Union' was particularly convenient exactly how it was, ... "Craig Berntson" wrote: ... outputs, including memos, with a 'Union' statement where the two tables ...
    (microsoft.public.fox.helpwanted)
  • Re: Expert advised needed.
    ... I have used the following command: ... >>> LTkId int ... >>> SysChDate datetime ... >>> Union All ...
    (microsoft.public.sqlserver.clients)
  • union of a number of variables - appending multiple files
    ... In the command 'union', we can have two variables onle ... At present I am using multiple 'load' command and multiple 'union' ...
    (comp.soft-sys.matlab)