load data from .csv file using OpenRowset

  • How to load data from .csv file using SELECT * INTO USING OpenRowset.

    Without creating source table, i need to insert the data from .csv file

    Regards

  • this should work work

    INSERT INTO ...

    SELECT ...

    FROM OPENROWSET ( ....

  • Thanks... Can you give me the provider name..

    with complete script

  • Thanks... Can you give me the provider name..

    with complete script

  • INSERT INTO tablename

    SELECT *

    FROM

    OPENROWSET ('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=C:\testfolder;', 'SELECT * from test.csv');

  • Hi..

    How to do SELECT * INTO..

    Because i don't want to create the table..

    I tried in below way

    SELECT * INTO XLImport55 FROM OPENROWSET ('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=D:\Test\;', 'SELECT * from TEST.csv');

    It works as everything iserted in one column.

    How to set delimiter ?

Viewing 6 posts - 1 through 5 (of 5 total)

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