The following lines contain the word 'select', 'insert', 'update' or 'delete':
G_LAST_UPDATE_DATE DATE := sysdate;
G_LAST_UPDATED_BY NUMBER := fnd_global.user_id;
G_LAST_UPDATE_LOGIN NUMBER := fnd_global.login_id;
l_select VARCHAR2(10000);
l_insert VARCHAR2(10000);
x_loading_status := 'CN_INSERTED';
l_select := '
SELECT CTRX.invoice_number invoice_number,
CTRX.invoice_date invoice_date,
CTRX.order_number order_number,
CTRX.booked_date order_date,
CTRX.creation_date creation_date,
CTRX.processed_date processed_date,
CL1.meaning trx_type_disp,
CL2.meaning adjust_status_disp,
CTRX.adjusted_by adjusted_by,
CTRX.load_status load_status,
'''' calc_status_disp,
CTRX.transaction_amount sales_credit,
CTRX.commission_amount commission,
CTRX.adjust_date adjust_date, ';
l_select := '
SELECT ctrx.invoice_number invoice_number,
ctrx.invoice_date invoice_date,
ctrx.order_number order_number,
ctrx.booked_date order_date,
ctrx.creation_date creation_date,
ctrx.processed_date processed_date,
clt.meaning trx_type_disp,
clad.meaning adjust_status_disp,
ctrx.adjusted_by adjusted_by,
'''' load_status,
cls.meaning calc_status_disp,
ctrx.transaction_amount sales_credit,
ctrx.commission_amount commission,
ctrx.adjust_date adjust_date, ';
l_select := l_select||'
ctrx.attribute1,ctrx.attribute2,ctrx.attribute3,
ctrx.attribute4, ctrx.attribute5, ctrx.attribute6,
ctrx.attribute7, ctrx.attribute8, ctrx.attribute9,
ctrx.attribute10, ctrx.attribute11, ctrx.attribute12,
ctrx.attribute13, ctrx.attribute14, ctrx.attribute15,
ctrx.attribute16, ctrx.attribute17, ctrx.attribute18,
ctrx.attribute19, ctrx.attribute20, ctrx.attribute21,
ctrx.attribute22, ctrx.attribute23, ctrx.attribute24,
ctrx.attribute25, ctrx.attribute26, ctrx.attribute27,
ctrx.attribute28, ctrx.attribute29, ctrx.attribute30,
ctrx.attribute31, ctrx.attribute32, ctrx.attribute33,
ctrx.attribute34, ctrx.attribute35, ctrx.attribute36,
ctrx.attribute37, ctrx.attribute38, ctrx.attribute39,
ctrx.attribute40, ctrx.attribute41, ctrx.attribute42,
ctrx.attribute43, ctrx.attribute44, ctrx.attribute45,
ctrx.attribute46, ctrx.attribute47, ctrx.attribute48,
ctrx.attribute49, ctrx.attribute50, ctrx.attribute51,
ctrx.attribute52, ctrx.attribute53, ctrx.attribute54,
ctrx.attribute55, ctrx.attribute56, ctrx.attribute57,
ctrx.attribute58, ctrx.attribute59, ctrx.attribute60,
ctrx.attribute61, ctrx.attribute62, ctrx.attribute63,
ctrx.attribute64, ctrx.attribute65, ctrx.attribute66,
ctrx.attribute67, ctrx.attribute68, ctrx.attribute69,
ctrx.attribute70, ctrx.attribute71, ctrx.attribute72,
ctrx.attribute73, ctrx.attribute74, ctrx.attribute75,
ctrx.attribute76, ctrx.attribute77, ctrx.attribute78,
ctrx.attribute79, ctrx.attribute80, ctrx.attribute81,
ctrx.attribute82, ctrx.attribute83, ctrx.attribute84,
ctrx.attribute85, ctrx.attribute86, ctrx.attribute87,
ctrx.attribute88, ctrx.attribute89, ctrx.attribute90,
ctrx.attribute91, ctrx.attribute92, ctrx.attribute93,
ctrx.attribute94, ctrx.attribute95, ctrx.attribute96,
ctrx.attribute97, ctrx.attribute98, ctrx.attribute99,
ctrx.attribute100 ';
query := l_select||' '||l_from||' '||l_where;