Hello,
I would like to know if someone as ever used an "in clause" containning at least two values in a JDBC Query activity (but the real number of value is dynamic).
I know work around exists (like using a SQL Direct acitivy after).
But I may have miss something. Maybe one of the datatype of the input parameter allow this ?
Best regards,
Mathieu
Could you please post a sample query you wish to execute?
Regards ~ Yeshodhan Kulkarni
Well,
Here is a small example.
SELECT tst.TEST_ID
FROM APP_TEST tst
WHERE tst.TEST_CODE in ('Code1', 'Code2', Code3')
The number of parameters can change.
WHERE tst.TEST_CODE in ('Code1', 'Code2')
or WHERE tst.TEST_CODE in ('Code1', 'Code2', 'Code3', 'Code4')
etc...
It's easy to do this with a Direct SQL Activity but I would like to know if it's possible to achieve this with a JDBC Query Activity.
The query would be like this :
SELECT tst.TEST_ID
FROM APP_TEST tst
WHERE tst.TEST_CODE in (?)
Best regards,
Mathieu
No this is not possible with JDBC Query palette.
This palette supports upto 1 dynamic input for IN caluse.
So if you have more than 1 value to pass in IN clause, then use SQL direct palette.
Thx,
I was expecting this answer.
Hope one day tibco will add this functionnality.
Best regards,
Mathieu
Hi Matieu,
you can do this with JDBC Query activity
try the below query .....
SELECT tst.TEST_ID
FROM APP_TEST tst
WHERE tst.TEST_CODE in ('select code from Table_A)
Thank
Tirumal
Sure it will works.
But this means to update the code list in the database before hand.
It answer my question but I think I was not clear enough when I explain my case.
I would like to do this with direct input of the activity and not with a sub-request (which seems to be impossible for the moment).
Thx
Mathieu