Importing CSV format file

  • Hi all,

    I wanted how to import .csv format file with steps in SQL Server 2005.

    Please provide suggestions

    Thanks in advance

    Karna

  • see Creating Packages Using the SQL Server Import and Export Wizard in BOL (SQL 2005)

     

  • Easy...

     

    Create a Data Flow Task (DFT) at the Control Flow Level of your package.  Next, add a Flat File Connection Manager to your package by Right-Clicking in the Connection Manager are and choosing 'New Flat File Connection Manager'

    Then inside of the DFT you created, create a Flat File Source object.  Point this to the Flat File Connection Manager you created earlier... set your column delimiter to ",", and your row delimiter to {CR}{LF}.  This should take care of it for you. 

     

    Make Sense?

     

    -Chris

  • chris corbin (5/30/2007)


    Create a Data Flow Task (DFT)at the Control Flow Level of your package. Next, add a Flat File Connection Manager to your package by Right-Clicking in the Connection Manager are and choosing 'New Flat File Connection Manager'

    Then inside of the DFT you created, create a Flat File Source object. Point this to the Flat File Connection Manager you created earlier... set your column delimiter to ",", and your row delimiter to {CR}{LF}. This should take care of it for you.

    -Chris

    Ian Cockcroft
    MCITP BI Specialist

  • Ian C0ckcroft (2/7/2012)


    Create a Data Flow Task (DFT) at the Control Flow Level of your package. Next, add a Flat File Connection Manager to your package by Right-Clicking in the Connection Manager are and choosing 'New Flat File Connection Manager'

    Then inside of the DFT you created, create a Flat File Source object. Point this to the Flat File Connection Manager you created earlier... set your column delimiter to ",", and your row delimiter to {CR}{LF}. This should take care of it for you.

    I sure hope they solved their import problem 5 years ago...

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • No Shit... did you seriously just copy my reply word for word???

  • It's reasons like this that I view Microsoft Certifications as absolutely worthless..

    FYI.. to everyone involved, the correct answer here is to write a C# app, or use the bulk insert command built into T-SQL. If only I knew then what I know now, I would have never even spent time trolling in an SSIS forum.

    SSIS is for those who don't know SQL.

  • chris corbin (12/13/2012)


    It's reasons like this that I view Microsoft Certifications as absolutely worthless..

    FYI.. to everyone involved, the correct answer here is to write a C# app, or use the bulk insert command built into T-SQL. If only I knew then what I know now, I would have never even spent time trolling in an SSIS forum.

    SSIS is for those who don't know SQL.

    There are many practical uses for SSIS that are much harder or practically impossible to do with SQL.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • chris corbin (12/13/2012)


    No Shit... did you seriously just copy my reply word for word???

    sorry, thought I quoted you..

    Eventually I did write a C# script that picks up the file, dynamically creates a staging table based on the file. column names etc. sql then pulls the data into another staging tableand the to DW. works well

    Ian Cockcroft
    MCITP BI Specialist

Viewing 9 posts - 1 through 8 (of 8 total)

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