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.  jdbc CustomSQL - in operator

    Posted 12/05/06 06:43 PM

    Is it possible to perform a multi-row delete using the ‘in’ operator over CustomSQL in the JDBC adapter? (Oracle db)

    I tried the following steps

    Sql:
    DELETE FROM Table1 WHERE Col1 IN ( ? )

    Input for Adapter:
    VARCHAR, java.lang.String, col_in

    When running, set col_in to
    ‘1002’, ‘1004’

    No records were deleted.

    When i set col_in to just 1004, without any quotes, the delete succeeded. Is there a way to concatenate and pass a list of values to the the in clause of a delete statement?

    Thanks for your help,
    Sunil


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


  • 2.  RE: jdbc CustomSQL - in operator

    Posted 05/06/13 07:08 PM

    did you ever receive any replies? I’m trying to implement an ‘in’ condition as well on a select. thanks!


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


  • 3.  RE: jdbc CustomSQL - in operator

    Posted 05/07/13 02:53 AM

    Use DynamicSQL Adapter template and pass the IN clause dynamically. I don’t think it is possible with CustommSQL. Any reason why you want to go with it?


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


  • 4.  RE: jdbc CustomSQL - in operator

    Posted 05/07/13 02:37 PM

    Hi Sunil,

    I have tried doing the same thing, but it wont work. Because “?” is a variable value you are passing, that may not take special chars. As senthil said, easy way is via Dynamic SQL (DELETE FROM Table1 WHERE Col1 IN ( ${columnVar})).

    But be aware of limits of “IN” clause.

    -Cheers,
    Niteesh


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


  • 5.  RE: jdbc CustomSQL - in operator

    Posted 05/07/13 02:45 PM

    Yes with CustomSQL question mark argument is the problem and so DynamicSQL passing argument is the option to go with as noted above:

    HTH,
    RMG


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