[dba-SQLServer] Union query

Klos, Susan Susan.Klos at fldoe.org
Thu Sep 30 14:55:09 CDT 2004


OK.  Where do I write this code?

Susan Klos
Senior Database Analyst
Evaluation and Reporting
Florida Department of Education
850-245-0708 
sc 205-0708
 

-----Original Message-----
From: Mackin, Christopher [mailto:CMackin at quiznos.com] 
Sent: Thursday, September 30, 2004 3:49 PM
To: dba-sqlserver at databaseadvisors.com
Subject: RE: [dba-SQLServer] Union query

Certainly,

Just use:

Create View dbo.MyView
AS
Select * From     dbo.schoolEnrollmentNumberselemonly
Union all
Select * From     dbo.SchoolEnrollmentNumberselemcombo


Then you can call dbo.MyView from whereever

-Chris Mackin

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Klos,
Susan
Sent: Thursday, September 30, 2004 1:34 PM
To: 'dba-sqlserver at databaseadvisors.com'
Subject: [dba-SQLServer] Union query


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

_______________________________________________
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