Where子句PL/SQL上的标识符无效

Where子句PL/SQL上的标识符无效,sql,where-clause,Sql,Where Clause,正在尝试对表中的数据执行查询。查询是“提供2015年1月1日之后发行的所有Neil Young专辑的专辑标题、发行日期和价格。” 表的相关结构(不包括其他部分)如下所示: create or replace type artist_type as object (artistName varchar(50), artistRole varchar(25)) / create type artist_array_type as varray(5) of artist_t

正在尝试对表中的数据执行查询。查询是“提供2015年1月1日之后发行的所有Neil Young专辑的专辑标题、发行日期和价格。”

表的相关结构(不包括其他部分)如下所示:

create or replace type artist_type as object 
(artistName     varchar(50), 
 artistRole     varchar(25))
/ 
create type artist_array_type  
as varray(5) of artist_type
/ 
create or replace type album_type as object 
(albumTitle         varchar(50),
 albumPlaytime      number(3), -- minutes
 albumReleaseDate   date, 
 albumGenre         varchar(15),
 albumPrice         number(9,2),
 albumTracks        number(2),
 albumArtists       artist_array_type,
 albumReviews       review_table_type,
member function discountPrice return number,
member function containsText (pString1 varchar2, pString2 varchar2) return integer)
not instantiable not final 
/
以下是我目前的查询

select a.albumtitle, a.albumreleasedate, a.albumprice
from albums a 
where a.albumartists.artist_type.artistname = 'Neil Young' 
    and a.albumreleasedate >= '1-Jan-2015'; 
但是,在尝试在Oracle SQL Developer中执行时,我发现错误:

ORA-00904:“A”“ALBUMARTISTS”“艺术家类型”“艺术家名称”:无效标识符

  • 00000-%s:无效标识符

  • @GordonLinoff,Join永远不能解决此问题。@GordonLinoff,Join永远不能解决此问题。