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)
 Data insertion with SQL Server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-04-17 : 10:47:47
Prasad writes "Hi, i need to insert multiple rows at one time using a transaction, for that either i have to use a loop and make database call for each row , is there a way where i can insert my entire datatable in one call."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-17 : 10:51:00
1 Insert into targetTable(columns) Select columns from sourceTable
2 For all the tables, back up the db and restore it other db

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

a_r_satish
Yak Posting Veteran

84 Posts

Posted - 2006-04-18 : 00:12:23


select * into newtbname
From oldtbname

satish.r
"Way to success is always under Construction"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-18 : 01:16:39
quote:
Originally posted by a_r_satish



select * into newtbname
From oldtbname

satish.r
"Way to success is always under Construction"



Thats not advisible for the table that has millions of records
In that case, create table and use the method 1

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -