I have a comma delimited text file which has data like this.
1, 11, "abc" ,False
2, 12, "def" ,False
3, 13, "ghi" ,False
4, 14, "jkl" ,False
The name of this file is somedata.txt. Only one column has double quotes.
i.e., "abc" "def" etc.
I want to store these values into a table named temp in SQL Server.
I am using bulk insert.
BULK INSERT temp FROM 'D:\somedata.txt' WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR='\n'
)
How to remove double quotes so that the data will be stored into table as
1,11,abc,0 (Here 0 refers that the column data type is bit).
Kindly help me regarding this.
Thanks,
Silpa