Posted by MC on 11/22/05 15:08
Try with something like this:
select <column list>
into newtable
from
(
select <column list>
from table1
union
select <column list>
from table2
) un
MC
"Andy Kent" <andykent.bristol1095@virgin.net> wrote in message
news:1132663862.886236.138010@g43g2000cwa.googlegroups.com...
> What's the syntax for combining INTO and UNION clauses?
>
> What I want to do is:
>
> SELECT blah
> INTO newtable
> FROM oldtable1
> WHERE <conditions>
> UNION
> SELECT blah
> INTO newtable
> FROM oldtable2
> WHERE <conditions>
>
> DTS doesn't seem to like my syntax. Where should the INTO(s) really go?
>
> Thanks
>
> Andy
>
Navigation:
[Reply to this message]
|