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
Expand all | Collapse all

JDBC Adapter: Dynamic SQL embedded variable

  • 1.  JDBC Adapter: Dynamic SQL embedded variable

    Posted Wed September 23, 2009 04:32 PM

    I am trying to create a dynamic SQL in a way that I have not attempted before. I need to dynamically pass the sql and the input values for it.

    For eg:
    The dynamic SQL adapter will have a variable called ${SQLSTRING} that accepts the following SQL. The SQL itself requires have dynamic input as shown below.

    SELECT STEP_TXT
    FROM STEP STP
    WHERE STEP_NM = ${STEPNAME}

    Is there a way to create a dynamic adapter in which I can provide the SQL and the input values for it or do I have to manually pluggin the input values before calling the dynamic SQL adapter?


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


  • 2.  RE: JDBC Adapter: Dynamic SQL embedded variable

    Posted Wed September 23, 2009 06:41 PM

    If I understand your question you would have to populate the field name / value assignments in the dynamic portion of your SQL statement before passing it to the dynamic SQL adapter service’s input. Using your example:

    SELECT STEP_TXT
    FROM STEP STP
    WHERE STEP_NM = ${STEPNAME}

    and assuming that STEPNAME would be populated with a sub-select such as

    (select step_nm from foo where bar = ‘baz’)

    then you would have to build the string above in your flow service before passing it as the input STEPNAME. You cannot (to my knowledge) pass:

    (select step_nm from foo where bar = ?)

    and an additional input value to provide the value ‘baz.’ I’d love to be wrong but I don’t think I am.


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