1
select k.Val, sum(k.Cnt) "Cnt" from
(
(select a.Env_Location "Val", count(a.VolumeID) "Cnt"
from DTree
join ZCOP_APLNG_Documents a on
DTree.DataID = a.DataID and DTree.VersionNum = a.VersionNum
where
DTree.OwnerID = -2111 and
DTree.SubType not in (0, 136) and
a.Env_Location is not NULL
group by a.Env_Location
)
union
(select
b.Env_Location "Val", count(b.VolumeID) "Cnt"
from DTree
join ZCOP_APLNG_Corr b on
DTree.DataID = b.DataID and DTree.VersionNum = b.VersionNum
where
DTree.OwnerID = -2111 and
DTree.SubType not in (0, 136) and
b.Env_Location is not NULL
group by b.Env_Location
)
) k
group by k.Val
누구든지이 작업을 도와 줄 수 있습니다. 오류 표시 Val 또는 Cnt가 잘못된 식별자입니다. 열에 일부 열 별칭을 사용할 수 없습니까 ??컬럼 별칭은 Oracle의 외부 쿼리에서 액세스 할 수 없습니다.
감사합니다. 저스틴 .. 대/소문자를 구분하는 식별자에 대해 알지 못했습니다. –