I'm trying to use the clause "IN" in one of my SQL requests (a classic "table in ("arg1", "arg2")). But, I don't know why, it doesn't seem to work. The thing that strikes me is that It does work when I use two requests (one with table == "arg1" and one with table == "arg2") and then use Union ALL. Did any of you have the same issue?
Last edit: Malouda 2015-07-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"In" clause works perfectly. If you need our help, you should provide a complete code example and the stack trace of the exception you get, other than the behaviour you expected .
For now, we can just notice that your use of sql is wrong:
not table in ("arg1", "arg2") but column in ("arg1", "arg2").
== is THE "Equal to" operator in java, not in SQL
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm trying to use the clause "IN" in one of my SQL requests (a classic "table in ("arg1", "arg2")). But, I don't know why, it doesn't seem to work. The thing that strikes me is that It does work when I use two requests (one with table == "arg1" and one with table == "arg2") and then use Union ALL. Did any of you have the same issue?
Last edit: Malouda 2015-07-11
"In" clause works perfectly. If you need our help, you should provide a complete code example and the stack trace of the exception you get, other than the behaviour you expected .
For now, we can just notice that your use of sql is wrong:
not table in ("arg1", "arg2") but column in ("arg1", "arg2").
== is THE "Equal to" operator in java, not in SQL