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 - 2004-10-21 : 08:28:28
|
Al writes "Hello. Thank you.I am in need of sending data in a text file to an already built table in SQL SERVER. The text file is dilemated and teh different fields will be updated.I also need to read the file in an automated way once a day with out the user having to do anything.I was told about mapping it, but am unfamiliar with mapping. But I don't know if that solves the automation. I guess maybe like a batch?I am in dire need of an answer. I hope I was clear enough to get a response.Thank you very much.al" |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-10-21 : 10:34:57
|
Seehttp://www.nigelrivett.net/ImportTextFiles.htmlYou will need to create something that will import the data - the link above gives an SP to do that.Then schedule the SP to run periodically and wait for the file to turn up.==========================================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. |
 |
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2004-10-21 : 13:43:46
|
I usually do:1. BULK INSERT the textfile into a staging table ( or temporary #table )2. Use SQL to move the rows from stage/#temp table into the Target tableWrap it all up in a stored procedure.========================================================================...You could also create a DTS package and schedule it...run "dtswiz" from the commandpromt/rockmoose |
 |
|
|
|
|