Как убрать двойные кавычки после разбора в операторе select на сервере sql
SELECT
@MiddleName = CASE
WHEN NumCommas_Name = 1 THEN
CASE
WHEN LEN(LTRIM(SUBSTRING(FullName, CHARINDEX(',', FullName) + 1, LEN(FullName)-1))) -
LEN(REPLACE(LTRIM(SUBSTRING(FullName, CHARINDEX(',', FullName) + 1,
LEN(FullName)-1)), ' ', '')) > 0
THEN LTRIM(SUBSTRING(LTRIM(SUBSTRING(FullName, CHARINDEX(',', FullName) + 1,
LEN(FullName)-1)), CHARINDEX(' ', LTRIM(SUBSTRING(FullName, CHARINDEX(',', FullName) + 1,
LEN(FullName)-1))) + 1, LEN(FullName)-1))
END
END
FROM
#TABLE
WHERE
ID = @Row_ID