Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Would DTS be faster for transferring data or script

Status
Not open for further replies.

sonname

Programmer
May 18, 2001
115
US
I have a table that I need to export from one database to another. My qestion is, would a DTS package be faster than individual insert statements in query analyzer to transfer over the data. The table is a rather large table.

Thanks
 
the sql statements will be faster.

Although for dts, I have once used the object automation method when running a dts and found that to be extremely fast, as compaired to running the dts normally from em, make of that what you will...

--------------------
Procrastinate Now!
 
sonname said:
individual insert statements

For an entire table?

Code:
SELECT * INTO newTable FROM otherTable

< M!ke >
Acupuncture Development: a jab well done.
 
>> I have a table that I need to export from one database to another

Are these databases on the same server? If so, a modified version of LBruno's advice is the way to go.

Code:
Select * 
Into   TargetDatabase.dbo.NewTable
From   SourceDatabase.dbo.ExistingTable

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
...and, tacking onto George's suggestion, if you don't want ALL the records from the ExistingTable, add a WHERE clause...

< M!ke >
Acupuncture Development: a jab well done.
 
even if they are on different servers, or even with different database engines, you can add the server as a linked server, and use direct sql...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top