Solved

Create a new table

Posted on 2011-03-23
5
261 Views
Last Modified: 2012-06-27
Select * 
From MIS.Dbo.Company_Staff_Property
union all
Select * 
From MIS.Dbo.Applicant_Staff_Property	

Open in new window


Hi from the above union I want to create a new table called Staff_Properties is it possible to do this
0
Comment
Question by:Davesm
5 Comments
 
LVL 16

Expert Comment

by:Imran Javed Zia
ID: 35197867
Sure, you can use wraper qury to do so. And then you can use it as per requirements
0
 
LVL 5

Accepted Solution

by:
Angelgeo earned 500 total points
ID: 35197898

select *
into 
Staff_Properties
from 
(
Select * 
From MIS.Dbo.Company_Staff_Property
union all
Select * 
From MIS.Dbo.Applicant_Staff_Property)a

Open in new window

0
 
LVL 3

Expert Comment

by:kumarnimavat
ID: 35197909
You may use the below given query to create a new table

Select * from New_table_name from
(
Select *
From MIS.Dbo.Company_Staff_Property
union all
Select *
From MIS.Dbo.Applicant_Staff_Property
) a
0
 
LVL 3

Expert Comment

by:kumarnimavat
ID: 35197915
Select * from Staff_Properties from
(
Select *
From MIS.Dbo.Company_Staff_Property
union all
Select *
From MIS.Dbo.Applicant_Staff_Property
) a
0
 

Author Closing Comment

by:Davesm
ID: 35197933
Awesome service
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now