Hi I need help!
I have some sql which do selecy from DB. But i have to change one string in select if only will be ne key from config file.
I have to change string “and (tlog.msgcls = '2') or (tlog.msgcls = '4' and tlog.msgclsorg = '2'))”
to the "and (tlog.msgcls = '1' or (tlog.msgcls = '4' and tlog.msgclsorg = '1')) ", bu if only key ONLYAUTH exists.
Do you know how can i do this? And how sql and c code will look?
CODE
#ifdef ORACLE_SQL
if ( onlyauth )
sprintf( select_buf,
"insert into txnexp_batch "
"select tlog.id "
", tlog.msgcls, tlog.fncode, tlog.pan"
", tlog.crdseqno, tlog.aiid, tlog.rrn, tlog.amttxn "
"%s"
"tlog.sysdate1 = '%s' " /* NMR010298 WLi 5/11/2003 */
"%s %s %s %s %s %s %s "
"and tlog.msgfn between '0' and '3' "
"and tlog.txnstatus in (7, 8, 11, 12) "
"and ((tlog.txncode in (0,1,2,10,11,20,22,26 %s) "
" and ((tlog.msgcls = '2') "
" or (tlog.msgcls = '4' and "
" tlog.msgclsorg = '2'))) "
" or tlog.msgcls not in ('1', '2', '4')) "
"and (tlog.fncode <> 690 or tlog.actioncode <> '0'"
" or tlog.rspcode not in ('05', '06')) ",
btchtyp_buf,
db_sysdate,
btch_buf,
onus_buf,
tc_buf,
mcc_buf,
fc_buf,
txnstatus_buf,
xife_buf,
inclcashin ? ",28" : "" );
}
#endif /* ORACLE_SQL */
}
This post has been edited by Dark_Nexus: 29 Nov, 2006 - 02:13 PM