We are using webMethods 8.2 version with JDBC Adapter 6.5 version and our database is Teradata.
I need to use IN operator in my JDBC Adapter service since I need to make a search based on a list of values.
I have successfully ran and tested the sql lstatement in Teradata SQL Assistant but when same sql is copied in custom adapter service, its not working.
Below mentioned are two sql statements that i tried to use in custom adapter but only 1st one is working and only with one value. I need to pass multiple values as input.
Select * from ABC where empID in (?)
Select * from ABC where empID in (${empID})
Second statement is not working but when error is thrown correct SQL can be seen in error details that we can execute in SQL Assistant.
e.g. Select * from ABC where empID in (11,22)
Error in Second SQL: Parameter index value 1 is outside the valid range of 1 through 0
Can we pass a list in where clause of adapter service.
Better you can go with dynamic sql if your passing multiple values as input in where clause. Or If your input list is fixed no of fields you can use custom sql by specifying “inputjdbcType” for each field.