Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Union Question

Status
Not open for further replies.

KiwiGuy

Technical User
Mar 13, 2001
15
GB
Hey All,

How do i use the results from a Union to insert into a tempory table?

i thought it should be

Select *
Into #tmptable
from
(select a from b
union
select a from c)

Help!!1
 
Try this

you might find it is easier to perform an insert into and have your select list subsequent to that but this should work

Select a
into #temptable
from b
union
select a from e
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top