The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT CurrencyNameCode currency,
InstrType,
Status,
COUNT(*) total_trxn,
SUM(amount) total_amt,
TRUNC(updatedate) trxndate
FROM iby_trxn_summaries_all
WHERE TRUNC(updatedate) >= l_date
AND trxntypeid IN (2,3)
AND instrtype IN (C_INSTRTYPE_CREDITCARD,C_INSTRTYPE_PURCHASECARD)
AND payeeid LIKE l_payeeId
GROUP BY INSTRTYPE,CurrencyNameCode, STATUS, TRUNC(updatedate)
ORDER BY INSTRTYPE,STATUS ASC;
SELECT CurrencyNameCode currency,
InstrType,
Status,
COUNT(*) total_trxn,
SUM(amount) total_amt,
TRUNC(updatedate) trxndate
FROM iby_trxn_summaries_all
WHERE TRUNC(updatedate) >= l_date
AND trxntypeid IN (3,8,9)
AND instrtype IN (C_INSTRTYPE_CREDITCARD,C_INSTRTYPE_PURCHASECARD)
AND payeeid LIKE l_payeeId
GROUP BY INSTRTYPE,CurrencyNameCode, STATUS, TRUNC(updatedate)
ORDER BY INSTRTYPE,STATUS ASC;
SELECT CurrencyNameCode currency,
InstrType,
Status,
COUNT(*) total_trxn,
SUM(amount) total_amt,
TRUNC(updatedate) trxndate
FROM iby_trxn_summaries_all
WHERE TRUNC(updatedate) >= l_date
AND trxntypeid IN (5,10,11)
AND instrtype IN (C_INSTRTYPE_CREDITCARD,C_INSTRTYPE_PURCHASECARD)
AND payeeid LIKE l_payeeId
GROUP BY INSTRTYPE,CurrencyNameCode, STATUS, TRUNC(updatedate)
ORDER BY INSTRTYPE,STATUS ASC;
SELECT CurrencyNameCode currency,
COUNT(*) total_trxn,
SUM(amount) total_amt,
TRUNC(updatedate) trxndate
FROM iby_trxn_summaries_all
WHERE transactionid IN
(
SELECT transactionid
FROM iby_trxn_summaries_all
WHERE instrtype IN (C_INSTRTYPE_CREDITCARD,C_INSTRTYPE_PURCHASECARD)
AND status = 0
GROUP BY transactionid
HAVING COUNT(*) = 1
)
AND TRUNC(updatedate) >= l_date
AND trxntypeid = 2
AND payeeid LIKE l_payeeid
GROUP BY CurrencyNamecode, TRUNC(updatedate)
ORDER BY CurrencyNameCode;
l_updatedate DATE;
l_updatedate := get_date(period);
FOR t_auths IN auth_summary_csr( l_updatedate, l_payeeId) LOOP
-- Bug 3714173: reporting currency is from the profile option
-- l_amount := Convert_Amount( t_auths.currency, C_TO_CURRENCY, t_auths.trxndate, t_auths.total_amt, NULL);
FOR t_capts IN capt_summary_csr( l_updatedate, l_payeeId) LOOP
-- Bug 3714173: reporting currency is from the profile option
-- l_amount := Convert_Amount( t_capts.currency, C_TO_CURRENCY, t_capts.trxndate, t_capts.total_amt, NULL);
FOR t_creds IN cred_summary_csr( l_updatedate, l_payeeId) LOOP
-- Bug 3714173: reporting currency is from the profile option
-- l_amount := Convert_Amount( t_creds.currency, C_TO_CURRENCY, t_creds.trxndate, t_creds.total_amt, NULL);
FOR t_outs IN load_auth_outstand_csr( l_updatedate,l_payeeId) LOOP
-- Bug 3714173: reporting currency is from the profile option
-- l_amount := Convert_Amount( t_outs.currency, C_TO_CURRENCY, t_outs.trxndate, t_outs.total_amt, NULL);
SELECT CurrencyNameCode currency,
Status,
COUNT(*) total_trxn,
SUM(amount) total_amt,
TRUNC(updatedate) trxndate
FROM iby_trxn_summaries_all
WHERE TRUNC(updatedate) >= l_date
AND trxntypeid IN (2,3)
AND instrtype IN (C_INSTRTYPE_CREDITCARD,C_INSTRTYPE_PURCHASECARD)
AND payeeid LIKE l_payeeId
AND status IN (-99,1,2,4,5,8,15,16,17,19,20,21,9999)
GROUP BY STATUS, CurrencyNameCode, TRUNC(updatedate)
ORDER BY status ASC;
SELECT CurrencyNameCode currency,
Status,
COUNT(*) total_trxn,
SUM(amount) total_amt,
TRUNC(updatedate) trxndate
FROM iby_trxn_summaries_all
WHERE TRUNC(updatedate) >= l_date
AND trxntypeid IN (3,8,9)
AND instrtype IN (C_INSTRTYPE_CREDITCARD,C_INSTRTYPE_PURCHASECARD)
AND payeeid LIKE l_payeeId
AND status IN (-99,1,2,4,5,8,15,16,17,19,20,21,9999)
GROUP BY STATUS, CurrencyNameCode, TRUNC(updatedate)
ORDER BY status ASC;
l_updatedate DATE;
l_updatedate := get_date(period);
FOR t_auths IN get_authFail_csr( l_updatedate, l_payeeId) LOOP
-- Bug 3714173: reporting currency is from the profile option
-- l_amount := Convert_Amount( t_auths.currency, C_TO_CURRENCY, t_auths.trxndate, t_auths.total_amt, NULL);
FOR t_auths IN get_settFail_csr( l_updatedate, l_payeeId) LOOP
-- Bug 3714173: reporting currency is from the profile option
-- l_amount := Convert_Amount( t_auths.currency, C_TO_CURRENCY, t_auths.trxndate, t_auths.total_amt, NULL);
SELECT CurrencyNameCode currency,
instrsubtype,
-- DECODE(trxntypeid, 3, 2, 5,-1, 10, -1, 11, -1, 1) factor, -- Bug 3306449
-- DECODE(trxntypeid, 5, -1, 10, -1, 11, -1, 2, 0, 1) factor, -- Bug 3458221
DECODE(trxntypeid, 5, -1, 8, 0, 9, 0, 10, -1, 11, -1, 1) factor,
COUNT(*) total_trxn,
SUM(amount) total_amt,
TRUNC(updatedate) trxndate
FROM iby_trxn_summaries_all
WHERE TRUNC(updatedate) >= l_date
AND trxntypeid IN (2,3,5,8,9,10,11)
AND instrtype IN (C_INSTRTYPE_CREDITCARD,C_INSTRTYPE_PURCHASECARD)
AND payeeid LIKE l_payeeId
AND instrsubtype IS NOT NULL
AND status IN
(-99,0,1,2,4,5,8,15,16,17,19,20,21,100,109,111,9999)
GROUP BY instrsubtype,
-- DECODE(trxntypeid, 3, 2, 5,-1, 10, -1, 11, -1, 1), -- Bug 3306449
-- DECODE(trxntypeid, 5, -1, 10, -1, 11, -1, 2, 0, 1), -- Bug 3458221
DECODE(trxntypeid, 5, -1, 8, 0, 9, 0, 10, -1, 11, -1, 1),
CurrencyNameCode, TRUNC(updatedate)
ORDER BY UPPER(instrsubtype) ASC;
l_updatedate DATE;
l_updatedate := get_date(period);
FOR t_auths IN get_CardType_csr( l_updatedate, l_payeeId) LOOP
-- Bug 3714173: reporting currency is from the profile option
-- l_amount := Convert_Amount( t_auths.currency, C_TO_CURRENCY, t_auths.trxndate, t_auths.total_amt, NULL);
SELECT b.name,
a.CurrencyNameCode currency,
-- DECODE(a.trxntypeid, 3, 2, 5,-1, 10, -1, 11, -1, 1) factor, -- Bug 3306449
-- DECODE(a.trxntypeid, 5, -1, 10, -1, 11, -1, 2, 0, 1) factor, -- Bug 3458221
DECODE(a.trxntypeid, 5, -1, 8, 0, 9, 0, 10, -1, 11, -1, 1) factor,
COUNT(*) total_trxn,
SUM(a.amount) total_amt,
TRUNC(a.updatedate) trxndate
FROM iby_trxn_summaries_all a,
iby_bepinfo b
WHERE TRUNC(updatedate) >= l_date
AND a.trxntypeid IN (2,3,5,8,9,10,11)
AND a.instrtype IN (C_INSTRTYPE_CREDITCARD,C_INSTRTYPE_PURCHASECARD)
AND a.payeeid LIKE l_payeeId
AND b.bepid = a.bepid
-- AND b.activestatus = 'Y'
AND a.status IN
(-99,0,1,2,4,5,8,15,16,17,19,20,21,100,109,111,9999)
GROUP BY b.name,
-- DECODE(a.trxntypeid, 3, 2, 5,-1, 10, -1, 11, -1, 1), -- Bug 3306449
-- DECODE(a.trxntypeid, 5, -1, 10, -1, 11, -1, 2, 0, 1), -- Bug 3458221
DECODE(a.trxntypeid, 5, -1, 8, 0, 9, 0, 10, -1, 11, -1, 1),
a.CurrencyNameCode, TRUNC(a.updatedate)
ORDER BY b.name ASC;
l_updatedate DATE;
l_updatedate := get_date(period);
FOR t_auths IN get_Processor_csr( l_updatedate, l_payeeId) LOOP
-- Bug 3714173: reporting currency is from the profile option
-- l_amount := Convert_Amount( t_auths.currency, C_TO_CURRENCY, t_auths.trxndate, t_auths.total_amt, NULL);
SELECT DECODE(a.overall_score - b.threshold, 0,0,a.overall_score - b.threshold ) value,
-- DECODE(a.trxntypeid, 3, 2, 1) factor, -- Bug 3306449
-- DECODE(a.trxntypeid, 2, 0, 1) factor, -- Bug 3458221
DECODE(a.trxntypeid, 8, 0, 9, 0, 1) factor,
COUNT(*) total_trxn
FROM iby_trxn_summaries_all a,
iby_payee b
WHERE TRUNC(updatedate) >= l_date
AND trxntypeid IN (2,3,5,8,9,10,11)
AND instrtype IN (C_INSTRTYPE_CREDITCARD,C_INSTRTYPE_PURCHASECARD)
AND a.payeeid = b.payeeid
AND b.payeeid LIKE l_payeeId
-- AND b.activestatus = 'Y'
AND b.threshold IS NOT NULL
AND a.overall_score IS NOT NULL
AND status IN (-99,0,1,2,4,5,8,15,16,17,19,20,21,100,109,111,9999)
GROUP BY DECODE(a.overall_score - b.threshold,0,0,a.overall_score - b.threshold ),
-- DECODE(a.trxntypeid, 3, 2, 1) -- Bug 3306449
-- DECODE(a.trxntypeid, 2, 0, 1) -- Bug 3458221
DECODE(a.trxntypeid, 8, 0, 9, 0, 1)
ORDER BY value ASC;
l_updatedate DATE;
l_updatedate := get_date(period);
FOR t_risk IN get_risk_csr( l_updatedate, l_payeeId) LOOP
total_screened := total_screened + (t_risk.total_trxn * t_risk.factor);