The following lines contain the word 'select', 'insert', 'update' or 'delete':
Insert Into Xtr_Interface_Errors(CREATED_BY ,
CREATION_DATE ,
LAST_UPDATED_BY ,
LAST_UPDATE_DATE ,
LAST_UPDATE_LOGIN ,
EXTERNAL_DEAL_ID ,
DEAL_TYPE ,
ERROR_COLUMN ,
ERROR_CODE ,
TRANSACTION_NO )
Values (Fnd_Global.User_Id,
Ld_sysdate,
Null,
Null,
Null,
AExt_Deal_Id,
ADeal_Type,
Error_Column,
Error_Code,
Transaction_No);
select count(*)
into l_count
from XTR_DEALS
where external_deal_id = p_external_deal_id
and deal_type = p_deal_type
and status_code <> 'CANCELLED';
select count(*)
into l_count
from XTR_INTERGROUP_TRANSFERS
where external_deal_id = p_external_deal_id;
select count(*)
into l_count
from XTR_DEALS
where external_deal_id = p_external_deal_id
and deal_type = p_deal_type
and status_code <> 'CANCELLED';
update xtr_deals_interface
set load_status_code = 'DUPLICATE_DEAL_ID',
last_update_date = trunc(SYSDATE),
Last_Updated_by = fnd_global.user_id
where external_deal_id = p_external_deal_id
and deal_type = p_external_deal_type;
select 'Y'
into l_dummy
from xtr_parties_v
where party_type = 'C'
and party_code = p_company_code
and rownum = 1;
b_updated Boolean:=false;
select lookup_code
from fnd_lookups
where lookup_type=p_lookupType
and (upper(lookup_code)=upper(p_value) or upper(meaning)=upper(p_value))
and rownum=1;
b_updated:=true;
b_local_updated BOOLEAN := FALSE;
SELECT bank_short_code
FROM xtr_bank_accounts_v
WHERE account_number = p_number;
SELECT account_number
FROM xtr_bank_accounts_v
WHERE bank_short_code=p_name;
b_local_updated:=TRUE;
b_local_updated:=TRUE;
IF (b_local_updated) THEN
p_account_number := p_new_number;
b_updated := TRUE;
if (b_updated) then
update xtr_deals_interface
set PRICING_MODEL = ARec.PRICING_MODEL,
MIRROR_PRICING_MODEL = ARec.MIRROR_PRICING_MODEL,
SETTLE_ACTION_REQD = ARec.SETTLE_ACTION_REQD,
BASIS_TYPE = ARec.BASIS_TYPE,
YEAR_CALC_TYPE = ARec.YEAR_CALC_TYPE,
DAY_COUNT_TYPE = ARec.DAY_COUNT_TYPE,
ROUNDING_TYPE = ARec.ROUNDING_TYPE,
CPARTY_ACCOUNT_NO = ARec.CPARTY_ACCOUNT_NO,
CPARTY_REF = ARec.CPARTY_REF,
ACCOUNT_NO_B = ARec.ACCOUNT_NO_B
where external_deal_id = ARec.EXTERNAL_DEAL_ID
and deal_type = ARec.DEAL_TYPE;
select *
from xtr_deals_interface
where external_deal_id = p_external_deal_id
and deal_type=p_user_deal_type;
Select Deal_Type
From Xtr_Deal_Types_V
Where User_Deal_Type = p_user_deal_type;
g_current_deal_log_list.delete;
g_current_deal_log_list.delete;
/* Call from form: select all 'SUBMIT' deals */
/*--------------------------------------------*/
Cursor Int_Form_Deal_Cursor(bDeal_Type In Varchar2,
bDeal_Fr In Varchar2,
bDeal_To In Varchar2) Is
Select *
From Xtr_Deals_Interface
Where Nvl(Load_Status_Code,'NEW') = 'SUBMIT'
Order By Deal_Type, company_code, cparty_code, currency_a, date_a, external_deal_id;
/* Call from concurrent program: select deals from criteria */
/*----------------------------------------------------------*/
Cursor Int_Con_Deal_Cursor(bDeal_Type In Varchar2,
bDeal_Fr In Varchar2,
bDeal_To In Varchar2,
bCompany_Code In Varchar2,
bLoad_Status In Varchar) Is
Select *
From Xtr_Deals_Interface
Where External_Deal_Id Between Nvl(bDeal_Fr,External_Deal_Id)
And Nvl(bDeal_To,External_Deal_Id)
And Company_Code Like Nvl(bCompany_Code,'%')
And Deal_Type Like Nvl(bDeal_Type,'%')
And Nvl(Load_Status_Code,'NEW') like nvl(bLoad_status,'%')
Order By Deal_Type, company_code, cparty_code, currency_a, date_a, external_deal_id;
Select Deal_Type
From Xtr_Deal_Types_V
Where User_Deal_Type = B_Deal_Type;
Select Name
From Xtr_Deal_Types_V
Where Deal_Type = p_deal_type;
delete from xtr_interface_errors
where external_deal_id = LRec_External_Deal.external_deal_id
and deal_type = LRec_External_Deal.deal_type;
delete
from xtr_transactions_interface tr
where not exists (
select dl.external_deal_id
from xtr_deals_interface dl
where dl.external_deal_id = tr.external_deal_id
and dl.deal_type = tr.deal_type
);
--* update as the same error for unsupported deal types also
-------------------------------------------------------------
UPDATE xtr_deals_interface
set load_status_code = 'DEAL_TYPE_ERROR',
last_update_date = trunc(SYSDATE),
Last_Updated_by = fnd_global.user_id
where external_deal_id = LRec_External_Deal.external_deal_id
and deal_type = LRec_External_Deal.deal_type;
UPDATE Xtr_Deals_Interface
SET Load_Status_Code='ERROR'
WHERE External_Deal_Id=LRec_External_Deal.External_Deal_Id;
g_current_deal_log_list.delete;
g_failure_log_list.delete;
UPDATE xtr_deals_interface
set load_status_code = 'DEAL_TYPE_ERROR',
last_update_date = trunc(SYSDATE),
Last_Updated_by = fnd_global.user_id
where external_deal_id = LRec_External_Deal.external_deal_id
and deal_type = LRec_External_Deal.deal_type;