Home  /  Questions  /  Question



50   50
Aug 24, 2014


Bulk Insert into Table

Hi All, 

I am reading and capturing an certain information from delimetered. Then I write those data values to another delimeter file as per the table structure.I  used Insert Bulk FileName. 
May you please advise on the following: 
  • Is there any other way to only insert the record at once. Reason being this has introduce an extra step to write the file FTP the file to SQL server. 
  • Also what should i do to to enable SQL to read the file even if it not in the same server as database server. 
  • How do I manage the difference of the tables since some tables has 6 other have 9 columns.

  • Thank you. 



50   50
Dec 20, 2014
I suggest you to choose SSIS Package because SSIS is meant for such tasks. Well, for accessing file from other/remote server , you can use .NET Impersonation. It gives you a "Run As" capability in your code. If you Google you will find  cut & paste code that you use with SSIS script.Using .NET bilkupload/Bulkcopy is not bad but using SSIS is right choice.

In SSIS " Script Task" you can write simple logic for column differences and make it work"

Best Regards
http://hakimshabir.blogspot.com