How do I import data from a single flat file into multiple tables???

  • Hello all,

    I have .csv file that I am trying to load into multiple tables on my sql server 2000...how do I perform this? If I look at the source file via notepad is all globbed together but in Wordpad its laid out row by row...I need to read each row and send to a certain table based on the first two digits...

    any guidance would be helpful...I am looking at DTS now...I tried BCP but I get Unexpected EOF encountered in BCP data-file.

    Thanks...

  • Your best bet with DTS is to import the file into a staging table that has columns corresponding to the logical fields in the flat file.  Then, you can you TSQL Insert statements to move rows to the correct tables.

    Greg

    Greg

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

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