Busy day! Another problem.. how to import a csv file??

  • Hi All,

    I've got a csv file and I'd like to get it into a temporary table (or something similar) to use it as usual. Does anyone know how to do this?

    Thanks, Tim

  • Use DTS and in your situation you just might use the DTS wizard and save whatever information you want into a table.  Read up on DTS and it should be pretty straightfoward.

    Matt

  • You could also try something like this,

    INSERT INTO TABLENAME(COLUMN LIST)

    SELECT * FROM OPENROWSET('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)};

    DefaultDir=Path to File Here;','SELECT * FROM File Name Here ')

    If this is a comma delimited file.

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

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