Home » SQL & PL/SQL » SQL & PL/SQL » Creating a union of 3 views
Creating a union of 3 views [message #18932] Thu, 21 February 2002 14:40 Go to next message
ED Jessup
Messages: 4
Registered: February 2002
Junior Member
I am creating a union of 3 views. I need to add a column to each view that distinguishes the account the view is associated with. When it is all unioned, I want to be able to see sales that are associated with each account. How can I do this?
Re: Creating a union of 3 views [message #18934 is a reply to message #18932] Thu, 21 February 2002 15:27 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
create view sales_v as
select a.*,'SALES1' sale_identifier from sales1 a
union
select b.*,'SALES2' from sales2 b
union
select c.*,'SALES3' from sales3 c
Previous Topic: help with some DBMS_SQL Code
Next Topic: Open Cursors
Goto Forum:
  


Current Time: Fri Sep 17 18:12:21 CDT 2021