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.

 View Only
  • 1.  How to Implement Custom SQL using execSQL

    Posted Mon July 15, 2002 01:34 PM

    I need to implement a custom sql statement to get a list of file names from the table. The SQL is
    Select File_Name from table where file_id in ( ? )
    Here I need to supply comma seperated value to the sql. I tried doing this with execSQL build-in-service, but its not working. Anybody done this before. Thanks in Advance

    Muru.


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 2.  RE: How to Implement Custom SQL using execSQL

    Posted Thu July 25, 2002 06:58 PM

    I had some problems with this as well. The execSQL component “second guesses” you in the handling of a comma-delimited list, and places quotes around your list - so what is actually passed to the database is something like:
    SELECT FILE_NAME FROM TABLE WHERE FILE_ID IN (“VALUE1,VALUE2,VALUE3,VALUE4,VALUE5”).
    To get around it, I had to use the ‘$dbProcessReporterTokens’ parameter (set it to ‘true’).
    Then, in your ‘$dbSQL’ parameter, use:
    SELECT FILE_NAME
    FROM TABLE
    WHERE FILE_ID IN (%value commaDelimitedList%).
    (You no longer need to set the $dbParam variables).
    The documentation mentions a performance cost associatd with this method, but it hasn’t killed us yet.

    Good luck,
    Curtis


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: How to Implement Custom SQL using execSQL

    Posted Fri July 26, 2002 11:21 AM

    FYI - Oracle has a hard limit of 1000 expressions in a list, so you’ll have to check that you’re IN clause has less than 1000 items.
    (Oracle error ORA-01795).


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General