May 12, 2015

Bulk import of csv, text file data into MS SQLServer 2012

Hi friends,

Today we have done bulk import of data using csv/txt format into MS SQLServer 2012.

Procedure

  1. Right click on your database and select “Tasks -> Import Data”
  2. Click the “Next>” button
  3. For the Data Source, select “Flat File Source”.
  4. Browse and select the CSV/TXT file
  5. For the Destination, select the correct database provider (e.g. for SQL Server 2012, you can use SQL Server Native Client 11.0).  Enter the Server name; check Use SQL Server Authentication, enter the User name, Password, and Database before clicking on the Next > button. 
  6. Change the options like delimiter, carriage return(new line), First row as header
  7. Spend some time configuring how you want the data to be imported before clicking on the Next > button.
  8. Change the table name
  9. Change the columns datatype
  10. Preview your table
  11. On the Select Source Tables and Views window, you can Edit Mappings before clicking on the Next > button
  12. Check Run immediately and click on the Next > button. 
  13. Click on the "Finish" button to run the package
  14. You data with the table will be selected
Enjoy the simple and useful bulk data import.

Please send your feedback and comments to psrdotcom@gmail.com

Blogger Labels: Bulk,text,data,SQLServer,Procedure,database,Tasks,Import,Click,Source,Flat,File,Browse,Change,options,carriage,header,Spend,columns,Preview,Finish,Enjoy

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com