oracle中字符串连接用‘||’不用‘+’。
select rec.SHEET_ID,
rec.orgID,
org.orgName,
case
when rec.RECEIVE_FLAG = 2 then
(case
when exists (select count(1)
fromEOSORG_T_Organization a
where a.orgSEQ like'99999.1123.%'
and a.orgID =rec.orgID) then
'[集团公司网运部]' ||org.orgName-- '[集团公司网运部]'+org.orgName
else
org.orgName
end)
else
org.orgName
end as pdforgName,
rec.RECEIVE_FLAG
fromOC_J_RECEIVE_ORG rec,
EOSORG_T_Organization org
where rec.orgID =org.orgID
and rec.RECEIVE_FLAG in (1, 2)
and rec.SHEET_ID = 3281;