ORA-00904 invalid identifier

0 votes

I am getting this error while doing an  inner join query using the oracle database:

 INNER JOIN PS_TBL_DEPARTMENT_DETAILS Team ON Team.DEPARTMENT_CODE = Employee.DEPTID
                                              *
ERROR at line 4:
ORA-00904: "TEAM"."DEPARTMENT_CODE": invalid identifier

Inner join query:

 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

The DDL of one table is:

CREATE TABLE "HRMS"."PS_TBL_DEPARTMENT_DETAILS"
(
  "Company Code" VARCHAR2(255),
  "Company Name" VARCHAR2(255),
  "Sector_Code" VARCHAR2(255),
  "Sector_Name" VARCHAR2(255),
  "Business_Unit_Code" VARCHAR2(255),
  "Business_Unit_Name" VARCHAR2(255),
  "Department_Code" VARCHAR2(255),
  "Department_Name" VARCHAR2(255),
  "HR_ORG_ID" VARCHAR2(255),
  "HR_ORG_Name" VARCHAR2(255),
  "Cost_Center_Number" VARCHAR2(255),
  " " VARCHAR2(255)
)
SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS

Can someone help me with this?

May 20, 2022 in Database by Kichu
• 19,040 points
1,033 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
1 answer

SQL error "ORA-01722: invalid number"

When an effort is made to convert ...READ MORE

answered Feb 15, 2022 in Database by Neha
• 9,020 points
3,154 views
0 votes
1 answer
0 votes
0 answers

SQL Server: Invalid Column Name

I am in the process of changing ...READ MORE

Aug 19, 2022 in Database by Kithuzzz
• 38,000 points
1,356 views
0 votes
0 answers

PL/SQL ORA-01422: exact fetch returns more than requested number of rows

I am getting this error: DECLARE * ERROR at line ...READ MORE

Aug 19, 2022 in Database by Kithuzzz
• 38,000 points
1,116 views
0 votes
0 answers

ORA-06502: PL/SQL: numeric or value error: character string buffer too small

I experimented with the following code in ...READ MORE

Aug 22, 2022 in Database by Kithuzzz
• 38,000 points
6,467 views
0 votes
0 answers

ORA-01476: "divisor is equal to zero" for SQL query (Oracle 10g)

I'm creating a SQL query with Oracle ...READ MORE

Aug 25, 2022 in Database by Kithuzzz
• 38,000 points
723 views
0 votes
1 answer

Is there any boolean type in Oracle database?

Nope. I don't think there is one But ...READ MORE

answered Oct 10, 2018 in Database by Neha
• 6,300 points
983 views
0 votes
0 answers

How do I list all the columns in a table?

For the various popular database systems, how ...READ MORE

Aug 9, 2022 in Database by Kithuzzz
• 38,000 points
540 views
0 votes
1 answer

SQL Error: ORA-00922: missing or invalid option

The lack of an underscore between "chartered" ...READ MORE

answered Sep 15, 2022 in Database by narikkadan
• 63,600 points
2,298 views
0 votes
1 answer

How to connect Java program to the MySQL database?

You can connect your Java code with ...READ MORE

answered May 11, 2018 in Java by Parth
• 4,640 points
1,913 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP