Questions tagged «ora-00904»

9
ORA-00904:无效的标识符
我尝试使用Oracle数据库编写以下内部联接查询: SELECT Employee.EMPLID as EmpID, Employee.FIRST_NAME AS Name, Team.DEPARTMENT_CODE AS TeamID, Team.Department_Name AS teamname FROM PS_TBL_EMPLOYEE_DETAILS Employee INNER JOIN PS_TBL_DEPARTMENT_DETAILS Team ON Team.DEPARTMENT_CODE = Employee.DEPTID 这给出了以下错误: INNER JOIN PS_TBL_DEPARTMENT_DETAILS Team ON Team.DEPARTMENT_CODE = Employee.DEPTID * ERROR at line 4: ORA-00904: "TEAM"."DEPARTMENT_CODE": invalid identifier 一个表的DDL为: CREATE TABLE "HRMS"."PS_TBL_DEPARTMENT_DETAILS" ( "Company Code" …

5
在WHERE子句中使用别名
我有一个查询,该查询旨在向我显示表A中最近更新不够的任何行。(每行应在“ month_no”之后的2个月内更新。): SELECT A.identifier , A.name , TO_NUMBER(DECODE( A.month_no , 1, 200803 , 2, 200804 , 3, 200805 , 4, 200806 , 5, 200807 , 6, 200808 , 7, 200809 , 8, 200810 , 9, 200811 , 10, 200812 , 11, 200701 , 12, 200702 , NULL)) as MONTH_NO , …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.