How to remove quotes from export and imported data files in SQL?
In need of steps on how to remove quotes from export and imported data files in SQL server database table.
In need of steps on how to remove quotes from export and imported data files in SQL server database table.
Hi Aditya!
You can use these codes to remove the quotes:
"UPDATE TableName SET FieldName = SUBSTRING(FieldName, 2, LEN(FieldName)) WHERE LEFT(FieldName, 1) =’”’;"
//This removes the left quote
"UPDATE TableName SET FieldName = SUBSTRING(FieldName, 1, LEN(FieldName)-1) WHERE RIGHT (FieldName, 1) =’”’;"
//This removes the right quote
Or this code:
"UPDATE TableName SET ColumnName = REPLACE(ColumnName,'"','');"
Hope this solves your problem.
Hi Aditya Derick,
There are so many ways to delete First bulk command, Second BCP and Last export / import wizard.
In Bulk command this command NO NEED to use a format file your will going to use this when you want to import a data that the first column quotation mark is prefix then the last is suffix.
In the BCP this command follows the default when you executed a SSMS query window.
In Export and Import you NEED to modify to select a file should me imported in GUI. This kind of command so many to me done so that you will come this kind of command.
I have a link to share with, it helps you to guide in all commands.
Thank you.
Hopefully that link will helps you and answered your question.
This link is to remove unwanted quotation Marks while importing a data.