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
324 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,840 points

Related Questions In Database

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
281 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
1,455 views
0 votes
1 answer

Which operator is used in the query for pattern matching?

LIKE operator is used for pattern matching, ...READ MORE

answered Oct 15, 2018 in Database by DataKing99
• 8,240 points
10,452 views
0 votes
1 answer

What are the steps performed by Migration Wizard while migrating a database to MySQL?

The following are the steps  performed by ...READ MORE

answered Dec 10, 2018 in Database by Sahiti
• 6,380 points
252 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 in Database by anonymous
8,494 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
6,301 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,810 points
6,846 views
0 votes
1 answer

Which query to use for better performance, join in SQL or using Dataset API?

DataFrames and SparkSQL performed almost about the ...READ MORE

answered Apr 19, 2018 in Apache Spark by kurt_cobain
• 9,390 points
814 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,840 points
1,717 views