私は(質問には適用されませんので、それ以上の多くのより多くの) ...奇妙な無効な識別子のエラーのOracle SQL
私はエラーが発生しますauthorw as (
select a.id, (sum(p.w)) "theWeightOfTheAuthor"
from ac a, pc p, authorpublication ap
where a.id = ap.aid and ap.pid = p.id
group by a.id)
select authorCount.id "ID", auth.name "NAME", authorCount.c "TOTAL_NUMBER_OF_PUBS",
athw.theWeightOfTheAuthor "W_SCORE",
(authorCount.C/athw.theWeightOfTheAuthor) "MULT"
from ac authorCount, authorw athw, Author auth
where authorCount.id = athw.id and authorCount.id = auth.id
order by TOTAL_NUMBER_OF_PUBS desc;
をOracleのSQLクエリのこの部分を持っています:
ORA-00904: "ATHW"."THEWEIGHTOFTHEAUTHOR": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Error at Line: 404 Column: 22
ライン404は、最後の行から4番目のもの:
(authorCount.C/athw.theWeightOfTheAuthor) "MULT"
注:I athw.id
にアクセスできます。authorw
の作成まで実行すると、テーブルは正しくtheWeightOfTheAuthor
列に正しく印刷されます。何がありますか?
'theWeightOfTheAuthor'は'「theWeightOfTheAuthor」 'その後、別の名前であるため。詳細は、マニュアルを参照してください。https://docs.oracle.com/database/121/SQLRF/sql_elements008.htm#SQLRF00223 –