You are here: Re: Combining INTO with UNION « MsSQL Server « IT news, forums, messages
Re: Combining INTO with UNION

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация