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
 Transact-SQL (2000)
 Fastest Way to copy a fields table to table in SP

Author  Topic 

NgKH
Starting Member

15 Posts

Posted - 2003-10-30 : 15:15:53
I was wondering, if i got fields in table A wanted to do some transformation and copy it to table B, what is the fastest way in a store procedure? i have to do

insert into B
select field1
, field2
etc.
from A

do i suppose to enable "select into / bulk copy" for faster performance? or in a database properties i have already put simple as logging, instead of full and select into/bulk copy..

which one perform more logging ? select into / bulk copy or simple???????

Edgar


Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-10-30 : 15:33:34
INSERT INTO ... is not affected by that option.
It is for SELECT INTO and BULK INSERT operations.
Go to Top of Page

NgKH
Starting Member

15 Posts

Posted - 2003-10-30 : 15:51:39
if i want to do insert field 1,2,4,5 from table A to table B how to write a builk insert operation in sql?
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-10-30 : 16:51:19
BULK INSERT -- is for files and is logged
INSERT INTO myTable99 (Col1, Col2) SELECT.. -- Is for tables or Literal data and is logged
SELECT * INTO FROM myTable99 -- Is for tables or Literal data, is not logged and creates a new object





Brett

8-)
Go to Top of Page
   

- Advertisement -