The following lines contain the word 'select', 'insert', 'update' or 'delete':
select 1
from XTR_CONFIRMATION_ACTIONS c,
XTR_PARTIES_V p
where p.PARTY_CODE = l_party
and c.CONFO_ACTION_GROUP = p.CONFO_ACTION_CODE
and c.DEAL_TYPE = p_deal_type
and c.ACTION_TYPE = p_action;
update XTR_CONFIRMATION_DETAILS
set DEAL_SUBTYPE = p_deal_subtype,
CURRENCY = p_currency,
AMOUNT = p_amount,
CONFO_PARTY_CODE = l_party
where DEAL_NO = p_deal_no
and TRANSACTION_NO = p_trans_no
and CLIENT_OR_CPARTY = 'CP';
insert into XTR_CONFIRMATION_DETAILS
(deal_no,transaction_no,action_type,client_or_cparty,date_created,
company_code,confo_party_code,file_name,deal_type,
deal_subtype,currency,amount,confirmation_validated_by,
confirmation_validated_on,status_code)
values
(p_deal_no,p_trans_no,p_action,'CP',sysdate,p_company_code,
l_party,NULL,p_deal_type,p_deal_subtype,p_currency,p_amount,
NULL,NULL,p_deal_status);
update XTR_CONFIRMATION_DETAILS
set DEAL_SUBTYPE = p_deal_subtype,
STATUS_CODE = p_deal_status,
CURRENCY = p_currency,
AMOUNT = p_amount,
CONFO_PARTY_CODE = l_party
where DEAL_NO = p_deal_no
and TRANSACTION_NO = p_trans_no
and CLIENT_OR_CPARTY = 'CL';
insert into XTR_CONFIRMATION_DETAILS
(deal_no,transaction_no,action_type,client_or_cparty,date_created,
company_code,confo_party_code,file_name,deal_type,
deal_subtype,currency,amount,confirmation_validated_by,
confirmation_validated_on,status_code)
values
(p_deal_no,p_trans_no,p_action,'CL',sysdate,p_company_code,
l_party,NULL,p_deal_type,p_deal_subtype,p_currency,p_amount,
NULL,NULL,p_deal_status);
delete from XTR_CONFIRMATION_DETAILS
where DEAL_NO = p_deal_no
and TRANSACTION_NO = nvl(p_trans_no,p_deal_no)
and FILE_NAME is NULL;
update XTR_CONFIRMATION_DETAILS
set STATUS_CODE = 'CANCELLED'
where DEAL_NO = p_deal_no
and TRANSACTION_NO = p_trans_no
and FILE_NAME is NOT NULL;
select a.DEAL_NO,
b.DEAL_TYPE
from XTR_TERM_ACTIONS a,
XTR_DEALS_V b
where ((a.DEAL_NO = P_DEAL_NO and P_DEAL_NO is not null) or (P_DEAL_NO is null))
and a.DEAL_NO = b.DEAL_NO
and a.CREATED_ON = P_CREATED_ON
and ((P_TEMPLATE_TYPE = 'RETAIL TERM CPARTY PRIN ADJUST' and
a.PRINCIPAL_ADJUST is not null and
a.INCREASE_EFFECTIVE_FROM_DATE = p_effective_date and
b.PAYMENT_SCHEDULE_CODE = nvl(P_PAYMENT_SCHEDULE,b.PAYMENT_SCHEDULE_CODE) and
b.PRODUCT_TYPE = nvl(P_PRODUCT_TYPE,b.PRODUCT_TYPE))
or (P_TEMPLATE_TYPE = 'RETAIL TERM CPARTY SCHEDULE' and
a.PAYMENT_SCHEDULE_CODE = nvl(P_PAYMENT_SCHEDULE,a.PAYMENT_SCHEDULE_CODE) and
a.FROM_START_DATE = p_effective_date and
b.PRODUCT_TYPE = nvl(P_PRODUCT_TYPE,b.PRODUCT_TYPE))
or (P_TEMPLATE_TYPE = 'RETAIL TERM CPARTY INT RESET' and
a.NEW_INTEREST_RATE is not null and
a.EFFECTIVE_FROM_DATE = p_effective_date and
b.PAYMENT_SCHEDULE_CODE = nvl(P_PAYMENT_SCHEDULE,b.PAYMENT_SCHEDULE_CODE) and
b.PRODUCT_TYPE = nvl(P_PRODUCT_TYPE,b.PRODUCT_TYPE)))
order by a.DEAL_NO;