It sounds like you are wanting to union the 2 tables into 1 view...
 
That would be something like:
   Create or Replace view1 
   (Col1, Col2)   
   AS   
   (Select Col1, Col2 from table1   
   UNION   
   Select Col1, Col2 from table2);   
 
Fred
 

________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Joe DeSouza
Sent: Monday, January 29, 2007 1:55 PM
To: arslist@ARSLIST.ORG
Subject: OT: Creating a view from 2 tables using SQL...


** 
I have table1 with Col1 and Col2
I have table2 with Col1 and Col2
 
I need to create a single view from both these tables, say view 1 where
Col1 of the view has every value that is in Col1 of both the tables and
Col2 of the view has all the values of Col2 of both the tables... There
is something wrong with the sql that I am writing resulting in a
'ORA-00957: duplicate column name'.
 
Could anyone point me to the syntax to write the above? Note that this
is not a conditional view - the view should basically contain all the
rows of both the tables basically 'merging' the 2 tables...
 
Cheers
 
Joe


_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to