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 in Database by Jyra
• 580 points
54 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 by Niroj
• 65,500 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,210 points
106 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 in Database by Okugbe
• 280 points
361 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,210 points
1,482 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,320 points
171 views
0 votes
1 answer

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

To display the name of the employees ...READ MORE

answered Sep 26, 2018 in Database by Sahiti
• 6,320 points
513 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 26, 2018 in Database by Sahiti
• 6,320 points
2,154 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
2,238 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,320 points
413 views
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 in Database by Niroj
• 65,500 points
724 views