Wednesday, March 7, 2012

Copying all data from table in one DB to another db

I have to SQL Databases.
The first one is used with MS Access to transfer/convert data from clients
existing database (could be any type) to a database (SQL Database A) in SQL
server. During the process data is modified to meet my applications
requirements
SQL database A - Has no constraints etc just the data fields.
SQL database B - has all the necessary constraints etc.
I have many tables that need to be coppied in a certain order. Is there a
way without DTS to create a script to copy all rows from the tables in SQL
Database A to SQL Database B so i can process the import in table order I
require.
Regards
Jeff
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 9/10/2003As long as the user has the correct permissions to the objects in both
databases, you could issue a series of INSERT INTO/SELECT statements to
move the data from the tables in Database A to Database B.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||... and those statements can be created with a cursor fairly easily. Look
at the sysobjects table with type U. Those objects are user tables.
hth
Quentin
"Rand Boyd [MS]" <rboyd@.onlinemicrosoft.com> wrote in message
news:ycqzEXFlDHA.576@.cpmsftngxa06.phx.gbl...
> As long as the user has the correct permissions to the objects in both
> databases, you could issue a series of INSERT INTO/SELECT statements to
> move the data from the tables in Database A to Database B.
> Rand
> This posting is provided "as is" with no warranties and confers no rights.
>

No comments:

Post a Comment