|
Question : SQL Synax to combine data in two views
|
|
Hi Experts,
I have two seperate views with exactly the same field names and data types. What I would like to do is create another view to consolidate the fields and data from the two seperate views.
For example if I have a view (view1) with the fields (field1 and field2) and I have another view (view2) with the fields (field1 and field2) - is there syntax I can use to create view3 using all the data from view1 and view2.
Many thanks for any help
Grant
|
|
Answer : SQL Synax to combine data in two views
|
|
CREATE VIEW vw_ALL AS
SELECT col1, col2 FROM view UNION ALL SELECT col1, col2 FROM view
*** The column data types must be the same.
|
|
|