-
Problem with IN operator
I'm having a strange problem when using IN operator in a query. The following query works in one database which is 9i and does not work(not returning any rows) in another database which is 10g.
select * from
where IN
(select from
where =
)
Another thing is if I replace the view with a table the query returns results in 10g. If I replace IN operator with a '=' the query returns results.
The question is:
Am i missing any default setting in database level? Why the query did not return any rows when I use view? Any ideas?
Thanks in advance,
-
I'm pretty sure the query you have posted is not the actual offending query.
IN operator works just fine on Ora10g; look at your code and your data.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
My query is like this
select * from table_name
where column_name IN
(select column_name from view_name
where column_name = value
)
It is returns records in another database which is 9i. If I use a table instead of view, I get records.
-
Originally Posted by lgopalakrishnan
If I use a table instead of view, I get records.
Most probably your view is wrong; look at your view.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
more info
It helps if you post create table/insert data and your select statement so we can check it out
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Click Here to Expand Forum to Full Width
|
|