我正在尝试找出我的错。
我收到此错误消息:



我已经检查了数据库,所有表都存在。

这是我的SQL代码:

select s1.*
 , p.city as "Produktionsort"
 , p.partname
from (select count(s.partno) as "Anzahl_Produktarten"
        , s.partno as "Partno"
      from company.supp_part_job s
      group by s.partno ) s1
 , company.part p
where s1.partno IN (select p1.partno from company.part p1 where p1.city != 'London')
   and p.partno = s1.partno
group by s1.partno

最佳答案

因为您在内部select(s1)partno中将别名别名为"Partno",所以在外部查询中必须将其称为区分大小写:

select s1.*
 , p.city as "Produktionsort"
 , p.partname
from (select count(s.partno) as "Anzahl_Produktarten"
        , s.partno as "Partno"
      from company.supp_part_job s
      group by s.partno ) s1
 , company.part p
where s1."Partno" IN (select p1.partno from company.part p1 where p1.city != 'London')
   and p.partno = s1."Partno"
group by s1."Partno"

关于sql - oracle sql开发人员: 00904. 00000- "%s: invalid identifier"。我的错在哪里,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23548568/

10-11 07:58