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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-11-25 : 08:23:49
|
| Paul writes "I must update several thousands of rows in a sql server 7 table.It’s done from a loop in a VB dll that’s calling a stored procedure that does:UPDATE mytable SET kolA=@A, kolB=@B WHERE primarykeyID=@prIDOf course @prID is constantly changing.Thousand times calling a sproc takes... a long time.There must be a faster way (Let the VB loop write all the update sql to a text file and then call a sproc that import the sql and execute it? Something like the BULK insert method?)" |
|
|
paulvan
Starting Member
1 Post |
Posted - 2001-11-25 : 14:37:33
|
| Solution looks great, thanks!!Only I want the holding_table replace with a implicit temporary table.So instead: BULK INSERT mydb.dbo.holding_table FROM ...I want: BULK INSERT #Temp_table FROM ...This causes the error message 4801:Bulk_main: The opentable system function on BULK INSERT table failed. Database ID %d, name '%.*ls'.When I use a explicitly created temp table it's works fine.Conclusion: no implicitly temp tables with BULK INSERT??Best regards, PaulThe implicit temp table is useless if I can't givethe columns names because I can't UPDATE and JOIN it with mytable??Edited by - paulvan on 11/25/2001 15:07:51 |
 |
|
|
|
|
|