Auto-load from Text file to SQL server

  • A transaction file will be ftp-ed into a folder at regular intervals.  I need to load the contents of this file into a table in SQL server.  How can this be done? Is there a way to automate this, i.e., whenever the ftp happens, the file contents needs to be uploaded to SQL.  Also, how do we load from the text file into SQL server?  Please assist.

  • Hi Sonia,

    You can use either BCP or DTS to load the data from text file to table.  Both can be scheduled in a SQL Server job.  Both are pretty well documented in Books OnLine.  My preference would be to use DTS with a step to detect if the text file is present in the folder and a Transform Data task to import the data.  http://www.sqldts.com/ is a good site for advice and how-tos.

    Greg

    Greg

  • Thanks a ton Greg.  This implementation is scheduled 2 weeks from now.  Will keep you posted. Thanks once again..

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply