Import CSV File into Sql Server Table Using SSIS

  • Step 1 : Right click on SSIS Packages , select ” New SSIS Package ” .
step 1
  • Step 2 : Drag “Data Flow Task” into Control Flow .
step 2
  • Step 3 : Drag ” Flat File Source ” into ” Data Flow ” and click Edit .
step 3
  • Step 4 : click on ” New ” Button to Browse the File .
step 4
  • Step 5 : click Browse button to select file from laptop .
step 5
  • Step 6 : Select the CSV File and click Open button .
step 6
  • Step 7 : Select ” Columns ” , You can check the preview rows .
step 7

Step 8 : Go to ” Advance ” , Select any column and you can edit , “Name ” , ” ColumnDelimeter ” , ” DataType ” . in my case , i edit DEPTNO DataType string to Numeric .

step 8
  • Step 9 : Inside DataFlow Designer , establish link between “Flat File Source ” and ” OLE DB Destination ” .
step 9
  • Step 10 : click on ” New ” Button and select Sql server connection , Data access mode should be ” Table or view ” , Select any Table after clicking DropdownBox .
step 10
  • Step 11 : Select “Mappings” From connection Manager . Drag suitable link between each and every columns.
step 11
  • Step 12 : After establishing link between source and destination .
step 12
  • Step 13 : click Start button to execute your mapping .
step 13
  • Step 14 : Mapping executed successfully, 4 rows loaded into sql server table .
step 14

so, this is the way , we can load CSV file data into sql server Database table .

Happy Coding , thanks…

Post Author: adama

1 thought on “Import CSV File into Sql Server Table Using SSIS

    Shanna Modisette

    (11/17/2019 - 6:40 pm)

    Exceptional post however , I was wondering if you could write a litte more on this subject? I’d be very grateful if you could elaborate a little bit further. Thanks!|

Leave a Reply

Your e-mail address will not be published. Required fields are marked *