如果条件正确,那么我希望将其标记为“暂停审核......”,如果它们不正确,则将其留空或由 t.fstrTaskSource + ' TYP ' + t填充.fstrType 语句(这部分已经有效)
SELECT t.flngKey AS flngTaskKey,
t.fstrAccountType,
t.fstrTaskSource,
CASE t.fstrCategory
WHEN '' THEN ''
ELSE t.fstrTaskSource + '_CAT_' + t.fstrCategory
END AS fstrCategory,
CASE t.fstrType
WHEN '' THEN ''
WHEN (wd.fstrWorkType = 'SUSIN1' -- I am getting a syntax error here on the = sign --
AND wd.fstrOwner = ' '
AND wd.flngworkkey = wr.flngworkkey
AND wr.fstrAccountType <> '007'
AND wr.fblnOpen = 1
AND EXISTS
(SELECT 1
FROM tblIndicator i
WHERE i.fstrIndicator = 'EIWTCH'
AND i.flngVer = 0
AND i.flngAccountKey = wd.flngAccountKey)) -- I am also getting an error here on the ) sign --
THEN 'Suspended for Audit Indicator - EIC Watch For'
ELSE t.fstrTaskSource + '_TYP_' + t.fstrType
END AS fstrType