[dba-SQLServer] Union query

Francisco Tapia fhtapia at gmail.com
Thu Sep 30 15:03:49 CDT 2004


Write this code in Query Analyzer

On Thu, 30 Sep 2004 15:55:09 -0400, Klos, Susan <susan.klos at fldoe.org> wrote:
> 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
> 
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 
> 



-- 
-Francisco
http://ft316db.VOTEorNOT.org
<a href="http://pcthis.blogspot.com">Pc This! with out the jargon</a>



More information about the dba-SQLServer mailing list