error while Retrieving the subquery column in where condition to main query

0 votes
I am trying to retrieve a column in sub query which is used in where condition in Oracle SQL.  I am facing ORA-00904 invalid identifier error. Below is the query. Can someone please resolve.

trying to retrieve ev.type , ev.fil_path in the sub-query select ev.type , ev.fil_path,ev.test_path from effortvariation ev

Query:

select
ev.fil_path,
ev.tes_path,
sp.uname,
sp.pwd,
s.desc,
sp.option,
oq.master_id,
oq.status
from onlineQuery oq
inner join supporttask s
on oq.sq =s.seq
inner join securityports sp
on sp.sq=oq.sq
where sp.type in (select ev.type , ev.fil_path,ev.test_path from effortvariation ev
where ev.team =(select team from allTeams where id ='k238')
and ev.name ='qa'
)
and sp.acct='active'
Sep 4, 2020 in Database by Jyra
• 580 points
1,280 views

1 answer to this question.

0 votes

Hello @Jyra,

You should first pay attention to error message, what is Oracle trying to say here. Invalid identifier means the column name entered is either missing or invalid

Solution:

Enter a valid column name. In Oracle database, a valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation marks. It may not be a reserved word.

You can also refer this to know more about the solution to solve this error.

Hope it helps you!!


 

answered Sep 4, 2020 by Niroj
• 82,880 points

Related Questions In Database

0 votes
0 answers

SQL to find the number of distinct values in a column

In a column, I can choose each ...READ MORE

Aug 15, 2022 in Database by Kithuzzz
• 38,020 points
863 views
0 votes
0 answers

How to Return Multiple Values from CASE clause in Where Condition

I have a condition where utilizing the ...READ MORE

Aug 25, 2022 in Database by Kithuzzz
• 38,020 points
2,093 views
0 votes
0 answers

How to see the real SQL query in Python cursor.execute using pyodbc and MS-Access

I use the following code in Python ...READ MORE

Sep 4, 2022 in Database by Kithuzzz
• 38,020 points
1,299 views
0 votes
2 answers

Write a SQL query to find the names of employees that begin with ‘S’

Select ename From emp Where ename like"s%"; READ MORE

answered Oct 7, 2021 in Database by anonymous
26,983 views
0 votes
1 answer

What is the SQL query to get the third highest salary of an employee from employee_table

You can try out something like this: SELECT ...READ MORE

answered Sep 27, 2018 in Database by Sahiti
• 6,370 points
12,549 views
0 votes
1 answer

How to schedule a job for SQL query to run daily?

down voteaccepted Expand the SQL Server Agent node ...READ MORE

answered Oct 25, 2018 in Database by Frankie
• 9,830 points
10,170 views
0 votes
1 answer

SQL query to find third highest salary in company

The easiest way to work this out ...READ MORE

answered Feb 21, 2022 in Database by Neha
• 9,020 points
51,146 views
0 votes
1 answer
0 votes
1 answer

Error Code: 2020. Lost connection to MySQL server during query

Hello @kartik, I got the same issue when ...READ MORE

answered May 4, 2020 in Database by Niroj
• 82,880 points
2,672 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