[dba-SQLServer] Union query

Arthur Fuller artful at rogers.com
Thu Sep 30 16:23:43 CDT 2004


Assuming that the new query is also a view, just call it as you would any other view or table-select.
 
i.e.
v1: select * from t1
v2: select * from t2 inner join t3 on pk = pk
v3: select top 25 col1, col2, col3 from v2 order by col1, col2 DESC
 
No problem. Every view is a virtual table. Treat it like a table.
 
HTH,
Arthur

"Klos, Susan" <Susan.Klos at fldoe.org> wrote:
Please be kind. I am doing this from an Access viewpoint and am having
trouble making a transition.

I have created a union query:

Select *

>From dbo.schoolEnrollmentNumberselemonly (this is a view)

Union all

Select *

>From dbo.SchoolEnrollmentNumberselemcombo (this is a view)



Now I need to be able to call this query in another view. Is this possible?
How?



Susan Klos

Senior Database Analyst

Evaluation and Reporting

Florida Department of Education

850-245-0708 

sc 205-0708



_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com




More information about the dba-SQLServer mailing list