How to covert tab separated file to CSV file

前端 未结 5 1492
逝去的感伤
逝去的感伤 2021-01-27 12:17

I have a tab separated text file which is about 1.2 GB , i need to convert it into CSV file(Comma Separated) using c#. I have to insert a bulk data into sqlserver, the data is i

5条回答
  •  死守一世寂寞
    2021-01-27 12:36

    The BULK INSERT command in SQL Server 2005 will use a tab as a field delimiter by default so there is no need to convert a tab delimited text file to csv format.

    In fact, converting it to a real csv will make things more difficult. BULK INSERT will not respect quotes as a string delimiter so a true csv file that has strings encapsulated by quotes with commas somewhere in the string will break the import.

    See https://msdn.microsoft.com/en-us/library/ms188365(v=sql.90).aspx for more information.

提交回复
热议问题