Connecting Tech Pros Worldwide Help | Site Map

Am i able to insert into a table data from a temp table?

Newbie
 
Join Date: Aug 2009
Posts: 1
#1: Aug 5 '09
i have split a database into two exact copies one for internal customer the other for external and they have started to right to there own copy.

the problem i have is some of the external cutomers where able to write to the internal database for a short period of time.

i want to know the easiest way to get the data out of one database to another. the table and column names are identical.

i have abstracted the data into temp tables and wanted to know if it is possible to the insert this into the other database. if not then any other ideas??

many thanks

amanda
Newbie
 
Join Date: Jun 2008
Posts: 25
#2: Aug 5 '09

re: Am i able to insert into a table data from a temp table?


You can combine the two easily, just use SELECT INTO.

Expand|Select|Wrap|Line Numbers
  1. SELECT [column1],[column2],[column#] INTO [mySchema].[myPermTable] FROM [mySchema].[myTempTable]
I know you probably already know all about SELECT statements but this link is definitely worth reading.
Reply