这实际上适用于先前的问题TSQL 2008 USING LTRIM(RTRIM and Still Have Spaces
我正在写一个非常冗长的SELECT语句,使用OMG PONIES语句删除NON NULL不可见字符
(WHEN PropStreetAddr is NOT NULL THEN
(SELECT LTRIM(RTRIM((REPLACE(PropStreetAddr,
SUBSTRING(PropStreetAddr,
PATINDEX('%[^a-zA-Z0-9 '''''']%',
PropStreetAddr),
1), '') AS PropStreetAddr)
查询:
SELECT
CASE WHEN LOAN_NUMBER IS NOT NULL THEN
REPLACE( LOAN_NUMBER,SUBSTRING (LOAN_NUMBER,PATINDEX( ' %[^a-zA-Z0-9 '''''']% ' , ' ' ) as LOAN_NUMBER.
,CASE WHEN MERS_ID IS NOT NULL THEN
REPLACE( MERS_ID,SUBSTRING (MERS_ID,PATINDEX( ' %[^a-zA-Z0-9 '''''']% ' , ' ' ) as MERS_ID
...127 more lines of similar statements
一旦检查语法,就会收到此错误,该错误指向SELECT之后的第一个Case语句:
有人可以帮助我了解我所缺少的吗?
最佳答案
您缺少一些对等的人。