Click here to Skip to main content
15,904,024 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to insert data from the tables in Identity Insert of a DB to the tables of another DB which has no identity Insert/constraints via a generic script.

There is bulk data to be inserted.

What I have tried:

Fetched the identity Insert tables and passed those via cursor. But the rest is to be done via a generic script.
Posted
Updated 29-Mar-16 19:39pm

1 solution

If the table structure is same, simple create a scripts with wizard, use following ways

Option 1 - Right click on the database you want to copy
- Choose 'Tasks' > 'Generate scripts'
- 'Select specific database objects'
- Check 'Tables'
- Mark 'Save to new query window'
- Click 'Advanced'
- Set 'Types of data to script' to 'Schema and data'
- Next, Next
- You can now run the generated query on the new database.

Option 2
- Right click on the database you want to copy
- 'Tasks' > 'Export Data'
- Next, Next
- Choose the database to copy the tables to
- Mark 'Copy data from one or more tables or views'
- Choose the tables you want to copy
- Finish
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900