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
407 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,740 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

1 day ago in Database by Kithuzzz
• 4,480 points
2 views
0 votes
1 answer

IN vs OR in the SQL WHERE Clause

I assume you want to know the ...READ MORE

answered Sep 24, 2018 in Database by DataKing99
• 8,240 points
524 views
0 votes
2 answers

What are the ways to get the count of records in a table

With the help of the SQL count ...READ MORE

answered Aug 20, 2020 in Database by Okugbe
• 280 points
2,104 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
13,687 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,380 points
7,382 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
8,053 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 in Database by Neha
• 8,740 points
4,454 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,740 points
1,961 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP