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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding the output of one table/table to another 2

Status
Not open for further replies.

nuct

Programmer
Sep 5, 2001
103
Hi,

is it possible to add the output of one view to another for example:

This...

name gender
------- -------
kenith male
malcombe male

name gender
------- -------
waynetta female
ethel female

would become this...

name gender
------- -------
kenith male
malcomb male
waynetta female
ethel female

Any help would be appreciated.

Simon
 
That table/table bit is supposed to say table/view.

Cheers

Simon
 
You could try ...

select * from view1
union
select * from view2

.. which would work for your example above. Duplicates would be ignored though.

Greg.
 
Duplicates will be eliminated with a UNION.
If you want to include duplicate rows, use UNION ALL.
 
Most excellent, Thanks

Simon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top