Click to See Complete Forum and Search --> : SQL - Merge two Queries


hdogg
02-09-2010, 03:13 PM
I have 2 Queries.

Query1 and Query2 pulling data from Table1 and Table2

Both Queries have the fields "Emp Name", and "Emp Number"

How would i write a query that pull all of the employees from Table1 and Table2, put them both in the same columns?

svidgen
02-09-2010, 03:20 PM
(query1) union (query2)

hdogg
02-09-2010, 03:29 PM
thanks!

here's what i ended up doing:

(select project,repeat("R",1) as Type from Reviews q1) UNION (select project,repeat("C",1) as Type from Reviews q2)