视图如下所示:
Create or Replace view MyView( Col1, Col2, Col3) as
select count(OuterQ.Name), OuterQ.Year, Outer.Date
(select InnerQ.Name, InnerQ.Year, X.Date,
From X
, ( select p.Id, p.Name, t.year from p,t where p.id = t.id) InnerQ
where X.field = 'YYY'
and X.value = t.value) OuterQ
group by OuterQ.Date, OuterQ.Year
例如,当我需要视图中的一个特定列值时,select Col1 from MyView;
我收到错误"904 invalid identifier"。
但是当我运行时select * from MyView
,查询运行良好。