How to remove quotes from export and imported data files in SQL?

Asked By 30 points N/A Posted on -
qa-featured

In need of steps on how to remove quotes from export and imported data files in SQL server database table.

SHARE
Best Answer by Roth Bridgette
Answered By 0 points N/A #135186

How to remove quotes from export and imported data files in SQL?

qa-featured

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.

Best Answer
Best Answer
Answered By 10 points N/A #135187

How to remove quotes from export and imported data files in SQL?

qa-featured

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.

 

Related Questions