I am trying to do a Bulk insert of a CSV file into SQL. I tested on dummy database using a created CSV file and got it working.
But the actual CSV file that has arrived has " around the name
eg "Hollywood". The Database has a fixed field length of 9 therefore the convert fails as the above name is 11 characters.
Is there a way of deleting the " before it tries to enter the field in the database. My Current Query looks something like this.
Bulk Insert <TableName>
FROM 'C:\Filepath.CSV'
WITH
(Datafiletype = 'Char'
,FIELDTERMINATOR = ',')
Any Help would be Coooool Thanks
But the actual CSV file that has arrived has " around the name
eg "Hollywood". The Database has a fixed field length of 9 therefore the convert fails as the above name is 11 characters.
Is there a way of deleting the " before it tries to enter the field in the database. My Current Query looks something like this.
Bulk Insert <TableName>
FROM 'C:\Filepath.CSV'
WITH
(Datafiletype = 'Char'
,FIELDTERMINATOR = ',')
Any Help would be Coooool Thanks