How to Implement Custom SQL

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 and do i need to set any field.

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’

Thanks in Advance

anil kumar

It should be in below syntax…

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=?

You have to specify jdbc data types, sql types and input fields.
It should work. For more info plz refer webMethods Jdbc adapter pdf

  • Asspl Vishnu