나는이 오류가 발생 해요 :오라클 11g CONCAT 함수 오류
ORA-00904 : " LASTNAME " : 유효하지 않은 식별자
CONCAT 함수를 사용하여 보고서를 만들려고 노력. 다음은 쿼리입니다 : 구글에
SELECT 'Full Name','User Name', 'Email' FROM Dual
UNION ALL
SELECT distinct concat(concat(firstname, ' '), lastname), username, Email
FROM
(
select distinct concat(concat(firstname, ' '), lastname), username, Email
from sas_aclentry, sas_usergroup
where sas_aclentry.userkey = sas_usergroup.userkey
and objecttype in (16,3,4,101,14,102) and productkey = 1 and type = 1 and privilege !=0 and isdeleted = 0 and STATUS IN (0, 32)
UNION
select distinct concat(concat(firstname, ' '), lastname), username, Email
from sas_objecttree
join sas_usergroup on sas_usergroup.userkey = sas_objecttree.childkey
where isdeleted = 0 and STATUS IN (0, 32)
and parentkey in (
select distinct sas_aclentry.userkey
from sas_aclentry
join sas_usergroup on sas_usergroup.userkey = sas_aclentry.userkey
where objecttype in (16,3,4,101,14,102) and productkey = 1 and type = 2 and privilege !=0 and isdeleted = 0)
)
WHERE UPPER(Email) LIKE '%SAS%';
방황하지만이 작동 할 수있는 방법을 찾을 수 없습니다. 도와주세요. 모든 입력을 감사하십시오.
윌
@ jpw - 아니, 맞습니다.이상하게도 2 args 걸립니다. :/ – Nicarus