Re: Simple merging question...
From: Bonj (benjtaylor)
Date: 10/17/04
- Next message: Adam Machanic: "Re: Many to Many query problem"
- Previous message: David Portas: "Re: Function that returns table with dynamic code"
- In reply to: Nazeer Oasis: "RE: Simple merging question..."
- Next in thread: Joe Celko: "Re: Simple merging question..."
- Messages sorted by: [ date ] [ thread ]
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!!!
>>
>>
>>
- Next message: Adam Machanic: "Re: Many to Many query problem"
- Previous message: David Portas: "Re: Function that returns table with dynamic code"
- In reply to: Nazeer Oasis: "RE: Simple merging question..."
- Next in thread: Joe Celko: "Re: Simple merging question..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|