Is there a way of importing CSV data into a SQL Server table where one of the columns contains JSON data?
An example CSV row might be the following:
1,{"testId": 2, "testName":"Hello!"},3,4,5
When I try to import this using the following SQL, it picks up the JSON commas as being delimeters
BULK INSERT TableName
FROM '<PathToCSV>'
WITH
(
FIRSTROW = 1,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '0x0A',
TABLOCK
)
Is there a way of intelligently filtering them out as literal commas rather than delimeters similar to how Excel handles it?
EDIT: Assume that its not feasible for me to edit the CSV's