Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to read specific column value and evaluate in "IN"

634773Jun 3 2008 — edited Jun 4 2008
Hi Guys,

I have a problem. Because there's a limit with the number of items that can be assigned to the " col_name IN ()", which 1000, I am not able to finish my project. Here's what I am trying to achieve:

I have an SQL select statement below:

SELECT VALUE FROM TABLE WHERE KEY IN (SELECT VALUES FROM OTHERTBL WHERE OTHERTBL_KEY = 'XXXX')

The problem lies within "IN" wherein the value of "VALUES" in table "OTHERTBL" is in this format:

'X1','X2','X3','X4','X5'

So basically, this is how my SELECT statement really should look:

SELECT VALUE FROM TABLE WHERE KEY IN ('X1','X2','X3','X4','X5')

But when I execute the first SELECT statement, there seems to be no output. However, if the latter SELECT statement is executed, it works!

Can someone please assist me on this? Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 2 2008
Added on Jun 3 2008
11 comments
2,349 views