Import from csv file

  • Everyday I recieve csv file from 20 difftrent location, file name is like that yyyymmddLocationID.csv this file has 5 cloumns. First cloumn contains location code 2 nd cloumn contains date (numeric), third cloumn contains ProductID and last two column contain numeric value. Now everyday I need to import every csv file into our SQL server. I created a table name ztblRDBNCDSPRINT and where promary is locationcode,date and ProductID. So no duplicate row will not insert like same date same location same productid will not be insert.

    Now inform me how can I import into SQL.

  • Hi fuddin,

    After you get all the files perform a loop to import to SQL like this example

    http://www.swynk.com/friends/green/dtsdirloopstep.asp

    And use lookups for check duplicate rows.

    Regards

    JFB

  • If you know VBScript you could consolidate all the info into one file from the all source files in the directory and then just do one import. Just another take on the problem

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

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