IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  IN operator in JDBC Custom Adapter

    Posted 02/03/14 06:19 AM

    Hi Experts,

    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.

    1. Select * from ABC where empID in (?)
    2. 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.

    Please suggest.

    Thanks,
    Amit


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: IN operator in JDBC Custom Adapter

    Posted 02/06/14 08:23 PM

    Hi Amit,

    You need to use Dynamic SQL and not Custom SQL. I had this same problem ages back.

    Cheers,
    David


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 3.  RE: IN operator in JDBC Custom Adapter

    Posted 02/07/14 04:28 AM

    Hi Amit,

    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.

    Please refer below link

    Thanks,
    Sai.


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 4.  RE: IN operator in JDBC Custom Adapter

    Posted 05/20/14 12:36 PM

    Does anyone know why we can’t specify an IN clause in a normal select/update/delete, just passing in an object list?


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: IN operator in JDBC Custom Adapter

    Posted 05/20/14 04:19 PM

    IN clause should work in custom and dynamic SQL template…what is the type you are using?

    HTH,
    RMG


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: IN operator in JDBC Custom Adapter

    Posted 05/21/14 04:22 AM

    Agreed, you can do it with custom and dynamic. I was wondering about a normal select/update/delete, just passing in an object list.


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: IN operator in JDBC Custom Adapter

    Posted 05/21/14 11:44 AM

    I don’t think it works when you pass it an argument as object list for the normal select in the IN clause…may be others can chime in.

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards