Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Joining Results from two Queries

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-20 : 08:24:59
Ejaz writes "Is there another way of joing the results from two queries to display them as one Resultset without using UNION/UNION ALL."

macka
Posting Yak Master

162 Posts

Posted - 2002-06-20 : 08:50:32
You could create a temporary table, insert the rows from the first query, then the rows from the second query. Nows its just a straight forward select on the temporary table.

macka.

Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2002-06-20 : 09:05:07
Theis doesn't contain "UNION ALL" but has the same effect:


SELECT COALESCE(T1.x, T2.x), COALESCE(T1.y, T2.y), COALESCE(T1.z, T2.z)
FROM T1
FULL OUTER JOIN T2 ON 0 = 1

 
(er, why?)


Edited by - Arnold Fribble on 06/20/2002 09:07:21
Go to Top of Page
   

- Advertisement -