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.  Date comparision

    Posted Fri July 21, 2006 02:43 AM

    Hi,
    I neet to compare date fileds in sql and webMethods
    the date field of SQL.
    date field , say Transaction_Date is string and contains value 01/08/2006.
    date field, say TranDate is java.util.Date(metioned in selectAdapter service), has value 02/08/2006.
    now i need to compare these values
    branch step
    —sequence step(%Product/Transaction_Date% = %results/TranDate)
    -----debuglog(message-‘cannot store’)
    but in my case, since both the dates have different values debug log should not be executed, but for me now the debug log is executing, even both the dates are not equal!!!
    what is the problem?


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: Date comparision

    Posted Fri July 21, 2006 09:28 AM

    Hai chowdary!

    did u make branch step propertity Evaluates labels ‘true’ ,if not make it and try.

    if u do the Evaluates labels true already…

    in the use == for comparision of two datattypes instead of ‘=’
    —sequence step(%Product/Transaction_Date% == %results/TranDate)


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: Date comparision

    Posted Fri July 21, 2006 10:02 AM

    inthe condition (%Product/Transaction_Date% == %results/TranDate) i think u are forget to give % at end for results/TranDate please keep % if forgot

    anilellendula


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Date comparision

    Posted Fri July 21, 2006 01:23 PM

    Hi,
    I did not forget giving % at last.
    however i will try with ur option


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Date comparision

    Posted Mon July 24, 2006 06:19 PM

    Hi Chowdari,
    The result in the JDBCAdapterService is a docList and so use the Loop step before you use the branch step. If you are sure that you will always get only 1 record in your SQL output, then you can avoid the LOOP but you still need to use in your label(%Product/Transaction_Date% == %results[0]/TranDate%)

    HTH,
    Bhawesh.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB