how to read specific column value and evaluate in "IN"
634773Jun 3 2008 — edited Jun 4 2008Hi 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.