Reply to Re: Combining INTO with UNION

Your name:

Reply:


Posted by Gert-Jan Strik on 11/22/05 22:27

You were quite close... Here's an example:

Use Northwind
GO

SELECT OrderID
INTO #t
FROM Orders
UNION
SELECT ProductID
FROM "Order Details"

HTH,
Gert-Jan


Andy Kent wrote:
>
> 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

[Back to original 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

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