Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How To: Select from one database and Insert into another

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-22 : 09:05:18
Vijay writes "Hello,
Is There a way to select certain fields from a table from Database (A) and Insert into Another table in Database (B).

Within SQL Server, like stored proc etc.

Thanks
Vijay"

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-04-22 : 09:24:15
You betcha

The syntax goes like this



Insert Into MyNewTable (all, the, fields, you like)
Select the, fields, in, first, table
From MyOldTable



If you want proper looking syntax, that is, the type that is in a book rather than from someone posting at 11:30pm after a few glasses of red wine them books online is the way, the truth and the light

Happy trails little camper

Damian
Go to Top of Page
   

- Advertisement -