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 - 2006-01-10 : 08:16:16
|
Lars writes "I am running a sql server, which I update with about 300.000 quarries everyday, this takes very long time, story is: I get a few files every morning, I read in the files into a program, I loop throw the file and for each row, I see if the post exists in my database, if so, I update two fields with the information in the text file. Now I wonder if there is any way to make a file and let sql handle that work, like doing a batch job, I provide a file with all the information needed, and let the sql server execute it. All att once.Any help and I would be grateful.Bets regards // Lars Karlsson" |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-01-10 : 09:30:36
|
Seehttp://www.nigelrivett.net/SQLTsql/ImportTextFiles.htmlThat will enable you to process all files in a folder.Just change MergeBCPData to do the update (can be a single statement if the data is a reasonable size).==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|