本文介绍了如何从列的值中删除双引号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是表格,每一列的值都用双引号()括起来.

Here is the table, each column value is wrapped with double quotes (").

Name    Number      Address Phone1  Fax Value   Status
"Test"  "10000000"  "AB"    "5555"  "555"   "555"   "Active"

如何去除每一列的双引号?我为每一列都试过这个:-

How to remove double quote from each column? I tried this for each column:-

UPDATE Table
SET Name = substring(Name,1,len(Name)-1)
where substring(Name,len(Name),1) = '"'

但正在寻找更可靠的解决方案.如果任何列有尾随空格,这将失败

but looking for more reliable solution. This fails if any column has trailing white space

推荐答案

就用 REPLACE?

Just use REPLACE?

...
SET Name = REPLACE(Name,'"', '')
...

这篇关于如何从列的值中删除双引号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 09:13
查看更多