How can I remove leading and trailing quotes in SQL Server?

前端 未结 14 1411
青春惊慌失措
青春惊慌失措 2020-12-15 03:28

I have a table in a SQL Server database with an NTEXT column. This column may contain data that is enclosed with double quotes. When I query for this column, I want to remo

14条回答
  •  既然无缘
    2020-12-15 03:54

    To remove both quotes you could do this

    SUBSTRING(fieldName, 2, lEN(fieldName) - 2)
    

    you can either assign or project the resulting value

提交回复
热议问题