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

how to reterive the data from Database By Custom SQL

  • 1.  how to reterive the data from Database By Custom SQL

    Posted Mon February 09, 2009 03:57 PM

    Hi all,

    i have sql statement that

    select senderid,receiverid,messagetype,keyfield,keyvalue,filename,xmlContent,createdate from TPT_MESSAGEVIEWERCONFIG where senderid IN (?) and receiverid IN (?) and messagetype=? and keyfield=? and keyvalue=? and filename =?,createdate=?

    in runtime sender id coming as a HSD,hambur sad and receivrId is DURNP,PNTP1 values from flow service

    i map the senderId and receiverId values to the above Custom SQL,output is not having any records,even the data in databse.

    can any one help me to sort out my problem,custom sql is correct or not do i neeed to change it

    in sql developer if i run the same SQL Code after passing above value i am getting records

    select filename,createdate from TPT_MESSAGEVIEWERCONFIG where senderid IN (‘HSD’,‘hambur’ ) and receiverid IN (‘durnp’,‘pntp1’) and messagetype=‘PREADVISE’ and keyfield=‘BOOKINGNUMBER’ and keyvalue=‘320930000769’


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


  • 2.  RE: how to reterive the data from Database By Custom SQL

    Posted Tue February 10, 2009 12:11 PM

    here is my sql statement that

    select senderid,receiverid,messagetype,keyfield,keyvalue,filename,createdate
    from TPT_MESSAGEVIEWERCONFIG where senderid in(?) and receiverid
    in(?)
    group by senderid,receiverid,filename,createdate
    order by createdate desc

    i am going to these values in runtime,in runtime sernerid may be one
    value i.e (TFR ) value or may be (HSD,hamsud burg ) as a input, for
    receiverid may be PNTPE or (PNTP1,DURNP) vaues ,in runtime TFR Value
    comes as senderId and receiverId as PNTPE i am getting records

    IN Database Table Records are like below

    senderId receiverId messaType keyField keyValue fileName createDate

    TFR PNTPE PREADVISE BOOKING 12334 xxx.txt 12-01-2009

    HSD PNTP1 PREADVISE BOOKING 3456 aaaa.txt 12-01-2009

    hamsud burg DURNP PREADVISE BOOKING 5678 tyu.txt 12-02-2009

    here the sql statement at the stage of adapter service

    select senderid,receiverid,messagetype,keyfield,keyvalue,filename,createdate
    from TPT_MESSAGEVIEWERCONFIG where senderid in(‘TFR’) and receiverid
    in(‘PNTPE’)
    group by senderid,receiverid,filename,createdate
    order by createdate desc

    it is ok,working fine

    in second scenario like

    neeed to select senderId in HSD,HAMSUD BURG and for receiverId in
    PNTP1,DURNP it is not giving records even there is record for senderid
    HSD and HAMSUD BURG and receiverId PNTP1,DURNP

    here the sql statement at the stage of adapter service

    select senderid,receiverid,messagetype,keyfield,keyvalue,filename,createdate
    from TPT_MESSAGEVIEWERCONFIG where senderid in(“HSD,HAMSUD BURG”) and
    receiverid in(“PNTP1,DURNP”)
    group by senderid,receiverid,filename,createdate
    order by createdate desc

    instead of sql statement

    select senderid,receiverid,messagetype,keyfield,keyvalue,filename,createdate
    from TPT_MESSAGEVIEWERCONFIG where senderid in(“HSD”,“HAMSUD BURG”) and
    receiverid in(“PNTP1”,“DURNP”)
    group by senderid,receiverid,filename,createdate
    order by createdate desc

    can you help me to sort out this problem.


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