ORA-06550: line 5, column 57: PLS-00103: Encountered the symbol "F01_" when
Hello,
I wanted to use the APEX_ITEM.DISPLAY_AND_SAVE
Here is my query:
DECLARE
QUERY VARCHAR2 (2000);
BEGIN
QUERY := 'SELECT '
||'APEX_ITEM.DISPLAY_AND_SAVE(1,REGISTRATION_ID,'f01_'||ROWNUM, NULL) REGISTRATION_ID, '
||'APEX_ITEM.DISPLAY_AND_SAVE(2,STATUS,'f02_'||ROWNUM, NULL) STATUS, '
||'APEX_ITEM.DISPLAY_AND_SAVE(3,CALL_CODE,'f03_'||ROWNUM, NULL) CALL_CODE, '
||'APEX_ITEM.DISPLAY_AND_SAVE(4,PARTNER_USER_ID,'f04_'||ROWNUM, NULL) PARTNER_USER_ID,'
||'APEX_ITEM.DISPLAY_AND_SAVE(5,COORDINATOR_USER_ID,'f05_'||ROWNUM, NULL) COORDINATOR_USER_ID, '
||'APEX_ITEM.DISPLAY_AND_SAVE(6,COORDINATOR_EMAIL,'f06_'||ROWNUM, NULL) COORDINATOR_EMAIL, '
||'APEX_ITEM.DISPLAY_AND_SAVE(7,COORDINATOR_FINAUTH_EMAIL,'f07_'||ROWNUM, NULL) COORDINATOR_FINAUTH_EMAIL,'
||'APEX_ITEM.DISPLAY_AND_SAVE(8,COORDINATOR_FULL_ADDRESS,'f08_'||ROWNUM, NULL) COORDINATOR_FULL_ADDRESS, '
||'APEX_ITEM.DISPLAY_AND_SAVE(9,COORDINATOR_NAME,'f09_'||ROWNUM, NULL) COORDINATOR_NAME, '
||'APEX_ITEM.DISPLAY_AND_SAVE(10,COORDINATOR_FAX,'f10_'||ROWNUM, NULL) COORDINATOR_FAX,'
||'APEX_ITEM.DISPLAY_AND_SAVE(11,COORDINATOR_TEL,'f11_'||ROWNUM, NULL) COORDINATOR_TEL, '
||'APEX_ITEM.DISPLAY_AND_SAVE(12,COORDINATOR_COUNTRY,'f12_'||ROWNUM, NULL) COORDINATOR_COUNTRY, '
||'APEX_ITEM.DISPLAY_AND_SAVE(13,COORDINATOR_COMPANY_NAME,'f13_'||ROWNUM, NULL) COORDINATOR_COMPANY_NAME,'
||'APEX_ITEM.DISPLAY_AND_SAVE(14,DATE_LETTER_SENT,'f14_'||ROWNUM, NULL) DATE_LETTER_SENT, '
||'APEX_ITEM.DISPLAY_AND_SAVE(15,DATE_LAST_SUBMISSION,'f15_'||ROWNUM, NULL) DATE_LAST_SUBMISSION, '
||'APEX_ITEM.DISPLAY_AND_SAVE(16,PROPOSAL_ACRONYM,'f16_'||ROWNUM, NULL) PROPOSAL_ACRONYM,'
||'APEX_ITEM.DISPLAY_AND_SAVE(17,INSTRUMENT_CODE,'f17_'||ROWNUM, NULL) INSTRUMENT_CODE, '
||'APEX_ITEM.DISPLAY_AND_SAVE(18,TITLE,'f18_'||ROWNUM, NULL) TITLE, '
||'APEX_ITEM.DISPLAY_AND_SAVE(19,SUBMITTED,'f19_'||ROWNUM, NULL) SUBMITTED, '
||'APEX_ITEM.DISPLAY_AND_SAVE(20,PREPARATION,'f20_'||ROWNUM, NULL) PREPARATION, '
||'APEX_ITEM.DISPLAY_AND_SAVE(21,PASS_BY_MAIL,'f21_'||ROWNUM, NULL) PASS_BY_MAIL,'
||'APEX_ITEM.DISPLAY_AND_SAVE(22,PROPOSAL_ID,'f22_'||ROWNUM, NULL) PROPOSAL_ID, '
||'APEX_ITEM.DISPLAY_AND_SAVE(23,PROPOSAL_NUMBER,'f23_'||ROWNUM, NULL) PROPOSAL_NUMBER '
||' FROM SUZANREGISTRATIONVIEW '
||' where 1 = 1 ';
IF LENGTH (V ('P4_REGISTRATION_ID')) > 0
THEN
QUERY :=
QUERY || ' and REGISTRATION_ID like ' || V ('P4_REGISTRATION_ID');
ELSE
QUERY := QUERY || '';
END IF;
IF LENGTH (V ('P4_CALL_CODE')) > 0
THEN
QUERY := QUERY || ' and CALL_CODE like ''' || V ('P4_CALL_CODE') || '''';
ELSE
QUERY := QUERY || '';
END IF;
IF LENGTH (V ('P4_COORDINATOR_USER_ID')) > 0
THEN
QUERY :=
QUERY
|| ' and (upper(COORDINATOR_USER_ID)) like (upper('''
|| V ('P4_COORDINATOR_USER_ID')
|| '''))';
ELSE
QUERY := QUERY || '';
END IF;
IF LENGTH (V ('P4_COORDINATOR_FINAUTH_EMAIL')) > 0
THEN
QUERY :=
QUERY
|| ' and (upper(R.COORDINATOR_EMAIL)) like (upper('''
|| V ('P4_COORDINATOR_FINAUTH_EMAIL')
|| '''))';
ELSE
QUERY := QUERY || '';
END IF;
IF LENGTH (V ('P4_COORDINATOR_NAME')) > 0
THEN
QUERY :=
QUERY
|| ' and upper(COORDINATOR_NAME) like (upper('''
|| V ('P4_COORDINATOR_NAME')
|| '''))';
ELSE
QUERY := QUERY || '';
END IF;
IF LENGTH (V ('P4_COORDINATOR_COMPANY_NAME')) > 0
THEN
QUERY :=
QUERY
|| ' and (upper(COORDINATOR_COMPANY_NAME)) like (upper('''
|| V ('P4_COORDINATOR_COMPANY_NAME')
|| '''))';
ELSE
QUERY := QUERY || '';
END IF;
IF LENGTH (V ('P4_PARTNER_USER_ID')) > 0
THEN
QUERY :=
QUERY
|| ' and (upper(PARTNER_USER_ID)) like (upper('''
|| V ('P4_PARTNER_USER_ID')
|| '''))';
ELSE
QUERY := QUERY || '';
END IF;
IF LENGTH (V ('P4_PROPOSAL_ACRONYM')) > 0
THEN
QUERY :=
QUERY
|| ' and (upper(proposal_acronym)) like (upper('''
|| V ('P4_PROPOSAL_ACRONYM')
|| '''))';
ELSE
QUERY := QUERY || '';
END IF;
RETURN QUERY;
END;
And here is the error encountered:
1 error has occurred
* Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the generic columns checkbox below the region source to proceed without parsing.
(ORA-06550: line 5, column 57: PLS-00103: Encountered the symbol "F01_" when expecting one of the following: * & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between || member SUBMULTISET_)
I don't understand why the engine returns an error at that point.
Despite the fact that I follow the user guide and the Denes Kubicek's sample examples, I still have that error.
If I remove the part 'f01_' || and only keep the rownum, the problem is solved.
Do you have any idea ?
Thanks in advance for your answers.
Regards,
Stessy Delcroix
HI MickyWay,
So simple. :-)
Problem solved.
Thanks a lot (merci beaucoup)
Similar Messages
-
ORA-06550: line 4, column 18: PLS-00103:
I am getting the error as below while i enter code in the conditional display of the region. Can you please help me how to fix it
ORA-06550: line 4, column 18: PLS-00103: Encountered the symbol "IF" when expecting one of the following: ( - + case mod new not null <an identifier> <a double-quoted delimited-identifier> <a bind variable> continue avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set speHi I have written the following code in one of the (--Region query) region. it works perfectly fine when i run alone region query. but when i put conditional display of this region it is giving error. the following condition has been given in region
--Condition code is PL/sql in region
IF :P2_PROJECT IS NOT NULL THEN
l_query := l_query ||q'[ AND trim(upper(budget_department.project_number)) =:P2_PROJECT ]';
END IF;---Region query.
DECLARE
l_query VARCHAR2(32676);
BEGIN
l_query := q'! SELECT DISTINCT
apex_item.checkbox( 1
,wo.wip_entity_id
,'onchange="javascript:CheckedAll(); setChkboxVal(this);"'
,:P0_CHK_LIST
) AS selecter
-- ,wo.work_order_status AS Status
,NVL((select STATUS from xxdl.xxdl_eam_its_pta_rollover WHERE wip_entity_id = wo.wip_entity_id),'') AS Status
,wo.wip_entity_name AS "Work Order Number"
,msn.asset_group_description AS "Asset Group"
,wo.asset_number AS "Asset Number"
,cust_prof.name As "Profile Class"
,wo.wip_entity_id As "wip_entity_id"
,wo.asset_group_id
,budget_department.project_id
,budget_department.project_number
,budget_department.task_id
,budget_department.task_number
,budget_department.award_id
,budget_department.award_number
FROM xxdl.xxdl_eam_wo_txn_accounts txn_acct
,apps.eam_work_orders_v wo
,apps.mtl_eam_asset_numbers_v msn
,apps.hz_cust_profile_classes cust_prof
,(SELECT tasks.task_id
,tasks.project_id
,valid_pta.award_id
,valid_pta.award_number
,(SELECT DISTINCT project_number
FROM xxdl.xxdl_valid_pta_combinations
WHERE project_id = tasks.project_id
) project_number
,tasks.task_number
,tasks.task_name
,tasks.description
,tasks.service_type_code
,orgs.organization_id
,orgs.name department_code
,orgs.attribute1 department_name
,orgs.attribute4 budget_unit
FROM pa.pa_tasks tasks
,xxdl.xxdl_valid_pta_combinations valid_pta
,hr.hr_all_organization_units orgs
WHERE orgs.organization_id = tasks.carrying_out_organization_id
AND valid_pta.task_id = tasks.task_id
) budget_department
WHERE txn_acct.organization_id = wo.organization_id
AND msn.current_organization_id = wo.organization_id
AND wo.organization_id = :app_organization_id
AND txn_acct.cost_bucket ='MATERIAL'
AND txn_acct.work_order_id = wo.wip_entity_id
AND msn.serial_number = wo.asset_number
-- AND wo.work_order_status = 'Draft'
AND budget_department.project_id = txn_acct.project_id
AND budget_department.task_id = txn_acct.task_id
AND budget_department.award_id = txn_acct.award_id
AND cust_prof.attribute1 = budget_department.budget_unit
AND cust_prof.status = 'A'
AND NVL(cust_prof.attribute2,budget_department.department_code) = budget_department.department_code
AND wo.wip_entity_id not in (select wip_entity_id from xxdl.xxdl_eam_its_pta_rollover where status != 'DRAFT')!';
IF :P2_PROJECT IS NOT NULL THEN
l_query := l_query ||q'[ AND trim(upper(budget_department.project_number)) =:P2_PROJECT ]';
END IF;
RETURN l_query;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20001,'The system faced an unhandled exception. Please contact System Administrators for resolution with the following error code :ITS-201 ('''||SQLERRM||''').' );
END;Edited by: 893185 on Aug 13, 2012 11:34 AM893185 wrote:
I am getting the error as below while i enter code in the conditional display of the region. Can you please help me how to fix it
Hi I have written the following code in one of the (--Region query) region. it works perfectly fine when i run alone region query. but when i put conditional display of this region it is giving error. the following condition has been given in region
--Condition code is PL/sql in region
IF :P2_PROJECT IS NOT NULL THEN
l_query := l_query ||q'[ AND trim(upper(budget_department.project_number)) =:P2_PROJECT ]';
END IF;
Can you provide more detail regarding what type of conditional display criteria you are using? The only one that will be anywhere near valid for the code you've included would be either "PL/SQL Expression" or "Function Body Returning Boolean"; the code fragment you've included would not be sufficient for either at the moment - note that there is no direct link between the code in the conditional expression and that in the region query, thus you cannot reference variables declared there e.g. "l_query".
I could help you with the syntax, but I suspect that probably what you want is the condition "Value of item in Expression 1 is not null", with "P2_PROJECT" entered in the "Expression 1" field. -
PLS-00103: Encountered the symbol "SELECT" when expecting one of the follow
Can any one tell me why I an getting compile error in Trigger with the following code (see below for the error message). Error is indicated in the IF statement Select clause.
Code:
-- AUdit Code Begin
-- Note: Ony for those tables having 'AUDIT' UDP
-- Value set to 'T'
IF (Select Count(*) From DBConfiguration
Where ConfigurationCode = 'AUDIT' AND
ConfigurationValue = 'T') > 0 THEN
WHEN (:new.WORKREQUESTSTATUS <> :old.WORKREQUESTSTATUS)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSTATUS',
:old.WORKREQUESTSTATUS,:new.WORKREQUESTSTATUS,:new.UserId)
End;
WHEN (:new.WORKREQUESTSOURCE <> :old.WORKREQUESTSOURCE)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSOURCE',
:old.WORKREQUESTSOURCE,:new.WORKREQUESTSOURCE,:new.UserId)
End;
WHEN (:new.WORKREQUESTSOURCEID <> :old.WORKREQUESTSOURCEID)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSOURCEID',
:old.WORKREQUESTSOURCEID,:new.WORKREQUESTSOURCEID,:new.UserId)
End;
WHEN (:new.WORKREQUESTDESC <> :old.WORKREQUESTDESC)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTDESC',
:old.WORKREQUESTDESC,:new.WORKREQUESTDESC,:new.UserId)
End;
WHEN (:new.WORKREQUESTDATE <> :old.WORKREQUESTDATE)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTDATE',
CAST(:old.WORKREQUESTDATE AS varchar2(256)),CAST(:new.WORKREQUESTDATE AS varchar2(256)),:new.UserId)
End;
WHEN (:new.WORKREQUESTOWNER <> :old.WORKREQUESTOWNER)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTOWNER',
:old.WORKREQUESTOWNER,:new.WORKREQUESTOWNER,:new.UserId)
End;
WHEN (:new.WORKREQUESTAPPCODE <> :old.WORKREQUESTAPPCODE)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPCODE',
:old.WORKREQUESTAPPCODE,:new.WORKREQUESTAPPCODE,:new.UserId)
End;
WHEN (:new.WORKREQUESTAPPROVER <> :old.WORKREQUESTAPPROVER)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPROVER',
:old.WORKREQUESTAPPROVER,:new.WORKREQUESTAPPROVER,:new.UserId)
End;
WHEN (:new.WORKREQUESTAPPDATE <> :old.WORKREQUESTAPPDATE)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPDATE',
CAST(:old.WORKREQUESTAPPDATE AS varchar2(256)),CAST(:new.WORKREQUESTAPPDATE AS varchar2(256)),:new.UserId)
End;
WHEN (:new.WORKREQUESTCOMMENT <> :old.WORKREQUESTCOMMENT)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTCOMMENT',
:old.WORKREQUESTCOMMENT,:new.WORKREQUESTCOMMENT,:new.UserId)
End;
WHEN (:new.CLOSEDATE <> :old.CLOSEDATE)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'CLOSEDATE',
CAST(:old.CLOSEDATE AS varchar2(256)),CAST(:new.CLOSEDATE AS varchar2(256)),:new.UserId)
End;
WHEN (:new.ANALYTEKEY <> :old.ANALYTEKEY)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'ANALYTEKEY',
CAST(:old.ANALYTEKEY AS varchar2(256)),CAST(:new.ANALYTEKEY AS varchar2(256)),:new.UserId)
End;
WHEN (:new.SUBPURPOSEKEY <> :old.SUBPURPOSEKEY)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'SUBPURPOSEKEY',
CAST(:old.SUBPURPOSEKEY AS varchar2(256)),CAST(:new.SUBPURPOSEKEY AS varchar2(256)),:new.UserId)
End;
WHEN (:new.PURPOSEKEY <> :old.PURPOSEKEY)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'PURPOSEKEY',
CAST(:old.PURPOSEKEY AS varchar2(256)),CAST(:new.PURPOSEKEY AS varchar2(256)),:new.UserId)
End;
End if;
-- Audit End
Error:
95/5 PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
( - + case mod new not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternativ
97/39 PLS-00103: Encountered the symbol ")" when expecting one of the following:
* & - + ; / at for mod remainder rem <an exponent (**)> and
or group having intersect minus order start union where
connect || multisetHere is the code:
-- AUdit Code Begin
-- Note: Ony for those tables having 'AUDIT' UDP
-- Value set to 'T'
IF (Select Count(DBConfigurationValue) From DBConfiguration
Where DBConfigurationCode = 'AUDIT' AND
DBConfigurationValue = 'T') > 0 THEN
WHEN (:new.WORKREQUESTSTATUS <> :old.WORKREQUESTSTATUS)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSTATUS',
:old.WORKREQUESTSTATUS,:new.WORKREQUESTSTATUS,:new.UserId)
End;
WHEN (:new.WORKREQUESTSOURCE <> :old.WORKREQUESTSOURCE)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSOURCE',
:old.WORKREQUESTSOURCE,:new.WORKREQUESTSOURCE,:new.UserId)
End;
WHEN (:new.WORKREQUESTSOURCEID <> :old.WORKREQUESTSOURCEID)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSOURCEID',
:old.WORKREQUESTSOURCEID,:new.WORKREQUESTSOURCEID,:new.UserId)
End;
WHEN (:new.WORKREQUESTDESC <> :old.WORKREQUESTDESC)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTDESC',
:old.WORKREQUESTDESC,:new.WORKREQUESTDESC,:new.UserId)
End;
WHEN (:new.WORKREQUESTDATE <> :old.WORKREQUESTDATE)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTDATE',
CAST(:old.WORKREQUESTDATE AS varchar2(256)),CAST(:new.WORKREQUESTDATE AS varchar2(256)),:new.UserId)
End;
WHEN (:new.WORKREQUESTOWNER <> :old.WORKREQUESTOWNER)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTOWNER',
:old.WORKREQUESTOWNER,:new.WORKREQUESTOWNER,:new.UserId)
End;
WHEN (:new.WORKREQUESTAPPCODE <> :old.WORKREQUESTAPPCODE)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPCODE',
:old.WORKREQUESTAPPCODE,:new.WORKREQUESTAPPCODE,:new.UserId)
End;
WHEN (:new.WORKREQUESTAPPROVER <> :old.WORKREQUESTAPPROVER)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPROVER',
:old.WORKREQUESTAPPROVER,:new.WORKREQUESTAPPROVER,:new.UserId)
End;
WHEN (:new.WORKREQUESTAPPDATE <> :old.WORKREQUESTAPPDATE)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPDATE',
CAST(:old.WORKREQUESTAPPDATE AS varchar2(256)),CAST(:new.WORKREQUESTAPPDATE AS varchar2(256)),:new.UserId)
End;
WHEN (:new.WORKREQUESTCOMMENT <> :old.WORKREQUESTCOMMENT)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTCOMMENT',
:old.WORKREQUESTCOMMENT,:new.WORKREQUESTCOMMENT,:new.UserId)
End;
WHEN (:new.CLOSEDATE <> :old.CLOSEDATE)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'CLOSEDATE',
CAST(:old.CLOSEDATE AS varchar2(256)),CAST(:new.CLOSEDATE AS varchar2(256)),:new.UserId)
End;
WHEN (:new.ANALYTEKEY <> :old.ANALYTEKEY)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'ANALYTEKEY',
CAST(:old.ANALYTEKEY AS varchar2(256)),CAST(:new.ANALYTEKEY AS varchar2(256)),:new.UserId)
End;
WHEN (:new.SUBPURPOSEKEY <> :old.SUBPURPOSEKEY)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'SUBPURPOSEKEY',
CAST(:old.SUBPURPOSEKEY AS varchar2(256)),CAST(:new.SUBPURPOSEKEY AS varchar2(256)),:new.UserId)
End;
WHEN (:new.PURPOSEKEY <> :old.PURPOSEKEY)
Begin
Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'PURPOSEKEY',
CAST(:old.PURPOSEKEY AS varchar2(256)),CAST(:new.PURPOSEKEY AS varchar2(256)),:new.UserId)
End;
End if; -
Encountered an error "PLS-00103: Encountered the symbol "CREATE" when expec
HI All,
I am creating a procedure and trying to use temp table...
Here is the code":
PROCEDURE P_PARENT_TREE
topic_id_in IN NUMBER,
topic_hierarchy_details_out OUT SYS_REFCURSOR
) IS
temp_children_level topic_children.children_level%TYPE;
temp_children_id topic_children.children_id%TYPE;
temp_topic_id topic.topic_id%TYPE;
CURSOR c_child_level IS
SELECT children_level, children_id
FROM topic_children
WHERE children_id = topic_id_in;
BEGIN
OPEN c_child_level;
FETCH c_child_level INTO temp_children_level,temp_topic_id ;
CLOSE c_child_level;
CREATE TEMPORARY TABLE IF NOT EXISTS topic_child
(t_topic_id NUMBER, t_children_id NUMBER, children_seq NUMBER);
WHILE temp_children_level > 0
LOOP
INSERT INTO topic_child(t_topic_id,t_children_id,children_seq)
values (
SELECT topic_id , children_id ,children_level
FROM topic_children
WHERE children_id = temp_topic_id);
temp_children_level := temp_children_level - 1;
END LOOP;
OPEN topic_hierarchy_details_out FOR
select * from topic_child;
END P_PARENT_TREE;
END TOPIC_PKG;
getting the error "PLS-00103: Encountered the symbol "CREATE" when expec"...
any idea why? or may be is there any other way to write this querysomething like
select connect_by_root child_topic ||sys_connect_by_path (topic, '>') path
from test
where connect_by_isleaf = 1
start with child_topic = 'aa4'
connect by child_topic = prior topicas in
SQL> with test as
2 (
3 select 0 sq, 'aa ' topic, 'aa1' child_topic from dual union all
4 select 1 sq, 'aa1' topic, 'aa2' child_topic from dual union all
5 select 3 sq, 'aa2' topic, 'aa3' child_topic from dual union all
6 select 4 sq, 'aa3' topic, 'aa4' child_topic from dual
7 )
8 select connect_by_root child_topic ||sys_connect_by_path (topic, '>') path
9 from test
10 where connect_by_isleaf = 1
11 start with child_topic = 'aa4'
12 connect by child_topic = prior topic
13 /
PATH
aa4>aa3>aa2>aa1>aa -
Yesterday AM. my customer went live with an upgrade. Things started out ok, but as the load on the system started to build, we started seeing errors.
The reported error is:
S1000 Oracle ODBC Ora ORA-06550: line 1, column 42:
PLS-00103: Encountered the symbol "¿" when expecting one of the following:
. ( ) , * @ % & = - + < / > at in is mod remainder not rem =>
<an exponent (**)> <> or != or ~= >= <= <> and or like
This is in response to calling a stored procedure with this signature.
MY_THING (
p1 IN NUMBER,
p2 OUT NUMBER,
p2 IN NUMBER
I believe this is a failure with the ODBC driver to parse
{call MY_STUFF.MY_THING(791200, ?, 1067744)}
Now to head off the obvious responses, I'm going to say these things in boldface
the procedure itself is fine, and works flawlessly under test
*nowhere in any of the code is an upside-down '?' as reported in the error message*
Has anyone else encountered this--or better yet solved it?thanks for the replies.
I'd have to rule out triggers at the point the stored procedure is run. Other than logging, it doesn't do any writes to the database. It does a couple of look-ups, and returns the results in a cursor. As for the web servers, they're pretty much copies of each other. 'Out of the box + updates' Windows Server 2008 machines with our application installed on each.
The software issuing the ODBC call is old, well worn, tried and true C++. In this case the only string parameters passed are 'PA' or 'PJ' the rest is all integers.
But again I want to stress that it doesn't appear that we reach the database when it fails. It appears to fail when the ODBC driver is parsing the '{call xxxxxx} statement.
On a hunch, I've just reconfigured our application to treat the offensive call as if it were an 'external' reference. Meaning that a new ODBC connection will be created/destroyed for each run. Not very efficient, but I'll take slow over broken any day. It's too early to tell if this will eliminate the error. -
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments
I am getting an error:
"ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'XYZ' ORA-06550: line 1, column 7: PL/SQL: Statement ignored".
Stored Procedure:
PROCEDURE XYZ
(ip_number IN NUMBER,
op_error_code OUT NUMBER,
op_error_text OUT VARCHAR2,
ret_cursor OUT OUT_CURSOR);
In the procedure I am selecting a details from few tables with respect to the input parameter 'ip_number'.
VB Code:
strConnectionString = CONNECTION_STRING
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.Open strConnectionString
Set objCommand = Server.CreateObject("ADODB.Command")
With objCommand
.ActiveConnection = objConnection
.CommandType = adCmdStoredProc
End With
With objCommand
.CommandText = "Pkg_1.XYZ"
.Parameters.Append objCommand.CreateParameter_
("ip_ipnumber",adNumeric,adParamInput,8,strIPNumber)
.Parameters.Append objCommand.CreateParameter_
("op_error_code",adNumeric,adParamOutput,10)
.Parameters.Append objCommand.CreateParameter_
("op_error_text",adVarChar,adParamOutput,512)
Set RS = .Execute()
End With
Its working fine with ASP(VB)+ Oracle9i + Windows2000.
But in ASP(VB) + Oracle 8.1.7 + Windows2000, its giving this error:
"ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'XYZ' ORA-06550: line 1, column 7: PL/SQL: Statement ignored".
Please help.Your procedure has 4 parameters 1 in and 3 out parameter
whereas in your VB code
Parameters.Append objCommand.CreateParameter_
("ip_ipnumber",adNumeric,adParamInput,8,strIPNumber)
.Parameters.Append objCommand.CreateParameter_
("op_error_code",adNumeric,adParamOutput,10)
.Parameters.Append objCommand.CreateParameter_
("op_error_text",adVarChar,adParamOutput,512)
There are only 3 parameter added where is the 4 th one ?
With Warm Regards
SSR -
Execution of the statement was unsuccessful. ORA-06550: line 3, column 1: PLS-00114: identifier 'WWV_FLOW_API#REMOVE_RESTFUL_SE' too long
begin wwv_flow_api#remove_restful_service ( p_id => 13033226431752970 + wwv_flow_api.g_id_offset ,p_name => 'oracle.example.hr' ); null; end;
ORA-06550: line 3, column 1: PLS-00114: identifier 'WWV_FLOW_API#REMOVE_RESTFUL_SE' too longi'm having the same problem as well.. here's my context:
Apex 4.2.2.00.11 Oracle 11g
we're in the midst of upgrading from 4.0
we have an apex 4.0 runtime only instance in production.
each night, we restore the the oracle instance with 4.0 to another instance and run a script to upgrade to 4.2.2 full function (development plus runtime) on this restored instance,. it has about 20-some workspaces, each with one app.
on the restored instance, yesterday i created a new workspace, gave it access to a couple of schemas, defined a couple of users. i imported a couple of apps, themes, css, images, etc. from our current development instance, which is 4.0. after this import, i was able to do development stuff with the app just fine.
so i exported the workspace yesterday, in anticipation of importing it this morning after the nightly refresh.
refresh ran, i logged in this morning as the apex admin user, and try to import the workspace. and get the
2. Re: 4.2 Import Faild ORA-06550: line 3, column 1: PLS-00114: identifier 'WWV_FLOW_API#REMOVE_RESTFUL_SE' too long
message. -
PLS-00103: Encountered the symbol "" when expecting one of the following:
Hi I am creating trigger using CFQUERY tag of cold fusion on oracle..
<CFQUERY DATASOURCE="CRM">
create or replace trigger AWC_ACCESSROLESID_TRI
before insert on AWC_ACCESSROLES
for each row
begin
select AWC_ACCESSROLESID_SEQ.nextval into :new.AR_ID from dual;
end;
</CFQUERY>
But the created trigger is not compiled, it is giving the following error
"Line # = 1 Column # = 6 Error Text = PLS-00103: Encountered the symbol "" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge <a single-quoted SQL string> pipe The symbol "" was ignored."
If I edit that trigger in enterprose manager console by pressing space and compile that, it is working fine with out any error. If i run the above statement in sql *plus, It is working fine with out any error.
Can you please tell me why this is happening if i run it using cfquery tag and also the possible solutions.
Thanks in advance,
VinodSo it works in Enterprise manager. It works in SQL*Plus. It doesn't work in CFQUERY. Sounds to me like a ColdFusion problem rather than an Oracle problem to be honest. Aren't there any ColdFusion support resources?
Cheers, APC -
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the f
I'm trying to follow an example pl/sql program to select from one table and insert into a second table in a LOOP.
I get a syntax error which I can't figure out
Line # = 67 Column # = 0 Error Text = PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
pipe
What is the cause?
IS
BEGIN
declare
v_pk1 bb_bb60_stats.pk1%TYPE;
v_event_type bb_bb60_stats.event_type%TYPE;
v_user_pk1 bb_bb60_stats.user_pk1%TYPE;
v_course_pk1 bb_bb60_stats.course_pk1%TYPE;
v_group_pk1 bb_bb60_stats.group_pk1%TYPE;
v_forum_pk1 bb_bb60_stats.forum_pk1%TYPE;
v_internal_handle bb_bb60_stats.internal_handle%TYPE;
v_content_pk1 bb_bb60_stats.content_pk1%TYPE;
v_data bb_bb60_stats.data%TYPE;
v_timestamp bb_bb60_stats.timestamp%TYPE;
v_status bb_bb60_stats.status%TYPE;
v_session_id bb_bb60_stats.session_id%TYPE;
v_messages bb_bb60_stats.messages%TYPE;
INSERT_COUNT NUMBER := 1;
CURSOR curs_aa
IS
SELECT * from bb_bb60_stats.activity_accumulator ;
BEGIN
OPEN curs_aa;
LOOP
FETCH curs_aa into
v_pk1,
v_event_type,
v_user_pk1 ,
v_course_pk1,
v_group_pk1,
v_forum_pk1,
v_internal_handle,
v_content_pk1 ,
v_data,
v_timestamp ,
v_status ,
v_session_id ,
v_messages;
INSERT INTO csuh_custom.aa_partitioned
VALUES
v_pk1,
v_event_type,
v_user_pk1 ,
v_course_pk1,
v_group_pk1,
v_forum_pk1,
v_internal_handle,
v_content_pk1,
v_data,
v_timestamp,
v_status,
v_session_id,
v_messages
-- commit after every 100 inserts to avoid large rollback segments
IF INSERT_COUNT = 25000 THEN
COMMIT;
INSERT_COUNT := 1;
ELSE
INSERT_COUNT := INSERT_COUNT + 1;
END IF;
END LOOP;
CLOSE curs_aa;When I add the END;
I get
Line # = 66 Column # = 0 Error Text = PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
pipe -
PLS-00103: Encountered the symbol ""
Hi
I'm trying to create a PL/SQL function using JDBC and the procedure gets created but with status invalid. After checking the user_errors view I get:
PLS-00103: Encountered the symbol "" when expecting one of the following: begin function package pragma procedure subtype type use form current cursor external language
I'm using the following statement:
statement = connection.prepareStatement ("CREATE OR REPLACE FUNCTION SCOTT.WHATEVER return varchar2 as begin return ('Whatever 2'); end;");
statement.execute ();
If I run the same statement from SQL*Plus I get no problems.
Yes!, the application requires that I create store procedures using JDBC, no other way.
Any ideas?
Regards,
Néstor BoscánNestor,
Works for me on Oracle 9.2.0.7 database (running on SUN [sparc] Solaris 9) with JDK 1.4.2_07 and "ojdbc14.jar" JDBC [thin] driver.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class CrSqlFun {
public static void main(String[] args) {
Connection c = null;
PreparedStatement ps = null;
String url = "jdbc:oracle:thin:scott/tiger@host:1521:orcl";
String sql = "create or replace function WHATEVER return varchar2 as " +
"begin return 'Whatever 2'; end;";
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
c = DriverManager.getConnection(url);
ps = c.prepareStatement(sql);
ps.executeUpdate();
catch (Exception x) {
x.printStackTrace(System.err);
finally {
if (ps != null) {
try {
ps.close();
catch (SQLException sx) {
System.out.println("Failed to close statement.");
if (c != null) {
try {
c.close();
catch (SQLException sx) {
System.out.println("Failed to close connection.");
}Good Luck,
Avi. -
ORA-06550: line 8, column 21: PLS-00306: wrong number or types of arguments
Hello,
I have a form page that inserts rows to a table by using a custom plsql which is defined via application process. the process is shown as:
DECLARE
v_loop NUMBER := trunc(:P43_SEG_SCH_DEP_DT2) - trunc(:P43_SEG_SCH_DEP_DT);
v_date date;
BEGIN
FOR v_LoopCounter IN 0..v_loop LOOP
v_date := trunc(:P43_SEG_SCH_DEP_DT) + v_LoopCounter * interval '1' day;
INSERT INTO slf_segment (id,
seg_sch_dep_dt,
dep_port,
arr_port,
bblf,
bslf)
VALUES (NULL,v_date,:P43_DEP_PORT,:P43_ARR_PORT,:P43_BBLF,:P43_BSLF);
END LOOP;
commit;
END;
Simply, there are two dates and for loop runs for as many times as the difference between two days. At each run, it inserts a row that adds 1 day to the start date.
I have tested the code in pl/sql developer and it runs perfectly. The table created as follows:
create table SLF_SEGMENT
ID NUMBER not null,
SEG_SCH_DEP_DT DATE,
DEP_PORT VARCHAR2(30),
ARR_PORT VARCHAR2(30),
BBLF NUMBER,
BSLF NUMBER
And I got the error which is the subject of my topic. Any help?mertov wrote:
v_loop NUMBER := trunc(:P43_SEG_SCH_DEP_DT2) - trunc(:P43_SEG_SCH_DEP_DT);
v_date := trunc(:P43_SEG_SCH_DEP_DT) <tt>trunc</tt> takes number or date parameters. APEX page items are stored in session state as character strings, so in these instances need to be converted into <tt>DATE</tt> values. It's best to do this explicitly, rather than relying on implicit conversion:
trunc(to_date(:P43_SEG_SCH_DEP_DT, 'DD/MM/YYYY' /* Format mask used in P43_SEG_SCH_DEP_DT item */)) -
JDBC receiver error:ORA-06550: line 1, column 7: PL/SQL
Hi,
I am geting this error in JDBC Receiver adapter. when i call the stored procedure.
Last week it works fine.But i today i faced this error.
Error Unable to execute statement for table or stored procedure. 'spec_utilities.SP_DELETE(Structure 'unassign') due to java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'SPEC_UTILITIES.SP_DELETE' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'spec_utilities.SP_DELETE(structure 'unassign'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'SPEC_UTILITIES.SP_DELETE' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'spec_utilities.SP_DELETE (structure 'unassign'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'SPEC_UTILITIES.SP_DELETE'must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
My stored procedure structure is:
<unassign>
<SP_DELETE action="EXECUTE">
<table>spec_utilities.SP_DELETE</table>
<PAE isInput="true" type="VARCHAR">447848</pAEIC>
<SKEY isInput="true" type="NUMERIC">4548545</pSKEY>
<USER isOutput="true" type="VARCHAR" />
<UNIT isOutput="true" type="VARCHAR" />
<EMAIL isOutput="true" type="VARCHAR" />
</SP_DELETE>
</unassign>
Can you suggest me where is this error.
Thank you
SateeshHi,
if it was executing fine earlier then check the below
1. user permissions level at the database..whether it has access to the required SP or not..
2. Check if there was any change in the SP..which has not been communicated...
HTH
Rajesh -
The following is the error msg, I am trying to run the stored procedure to insert data into few tables.
Pls suggest any solution to this error msg: Thanks.
08/05/2005 11:27:41-> Level:1, UpLoader: SQL Error Messge: [SERVERERROR] ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'ENTPRFMAN'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
PROCEDURE ENTPRFMAN
p_source_acct_id char, /*1*/
p_source_system char, /*2*/
p_entity_name char, /*3*/
p_entity_legal_name char, /*4*/
p_entity_long_name char, /*5*/
p_associated_entity_id char, /*6*/
p_entity_type char, /*7*/
p_list_order char, /*8*/
p_tax_id_number char, /*9*/
p_inception_date char, /*10*/
p_fiscal_end_date char, /*11*/
p_marketing_open_date char, /*12*/
p_base_currency char, /*13*/
p_account_status char, /*14*/
p_entity_code char, /*15*/
p_orig_source_system char, /*16*/
p_account_legal_form char, /*17*/
p_business_sector char, /*18*/
p_direct_account_ind char, /*19*/
p_portfolio_type_code char, /*20*/
p_target_dict_name char, /*21*/
p_dict_level char, /*22*/
p_cust_indx_type char, /*23*/
p_blnd_source char, /*24*/
p_ml_interpolate_yn char, /*25*/
p_source_level1 char, /*26*/
p_source_entity_xref1 char, /*27*/
p_source_entity_xref1_type char, /*28*/
p_source_dict_name1 char, /*29*/
p_weight1 char, /*30*/
p_source_level2 char, /*31*/
p_source_entity_xref2 char, /*32*/
p_source_entity_xref2_type char, /*33*/
p_source_dict_name2 char, /*34*/
p_weight2 char, /*35*/
p_source_level3 char, /*36*/
p_source_entity_xref3 char, /*37*/
p_source_entity_xref3_type char, /*38*/
p_source_dict_name3 char, /*39*/
p_weight3 char, /*40*/
p_source_level4 char, /*41*/
p_source_entity_xref4 char, /*42*/
p_source_entity_xref4_type char, /*43*/
p_source_dict_name4 char, /*44*/
p_weight4 char, /*45*/
p_source_level5 char, /*46*/
p_source_entity_xref5 char, /*47*/
p_source_entity_xref5_type char, /*48*/
p_source_dict_name5 char, /*49*/
p_weight5 char, /*50*/
p_source_level6 char, /*51*/
p_source_entity_xref6 char, /*52*/
p_source_entity_xref6_type char, /*53*/
p_source_dict_name6 char, /*54*/
p_weight6 char, /*55*/
p_source_level7 char, /*56*/
p_source_entity_xref7 char, /*57*/
p_source_entity_xref7_type char, /*58*/
p_source_dict_name7 char, /*59*/
p_weight7 char, /*60*/
p_source_level8 char, /*61*/
p_source_entity_xref8 char, /*62*/
p_source_entity_xref8_type char, /*63*/
p_source_dict_name8 char, /*64*/
p_weight8 char, /*65*/
p_source_level9 char, /*66*/
p_source_entity_xref9 char, /*67*/
p_source_entity_xref9_type char, /*68*/
p_source_dict_name9 char, /*69*/
p_weight9 char, /*70*/
p_source_level10 char, /*71*/
p_source_entity_xref10 char, /*72*/
p_source_entity_xref10_type char, /*73*/
p_source_dict_name10 char, /*74*/
p_weight10 char, /*75*/
p_OUT OUT char
AS
v_date rulesdbo.entity.upd_date%TYPE:= SYSDATE;
v_update_source rulesdbo.entity.upd_user%TYPE:= 'PRFENT';
v_entity_id rulesdbo.entity.entity_id%type;
b_valid BOOLEAN;
/* Supported Entity Types - Index Index */
v_sb_entity_type rulesdbo.entity.entity_type%type:= 'INDX';
v_bb_entity_type rulesdbo.entity.entity_type%type:= 'CIDX';
v_bb_dict_l1_cv rulesdbo.dictionary_detail.dict_l1_code_value%type := 'TOTAL';
na_outparam EagleGen.t_outparam;
/* Constants */
g_prf_intfc rulesdbo.entity.src_intfc_inst%type:= -1;
v_src_intfc_inst rulesdbo.entity.src_intfc_inst%type:= -1;
/* Business Groups */
v_group_name1 pace_masterdbo.pace_user_groups.group_name%type := 'ASP Reporting Grp';
v_group_name2 pace_masterdbo.pace_user_groups.group_name%type := 'Client Rptg Grp';
v_group_name3 pace_masterdbo.pace_user_groups.group_name%type := 'Client Rptg Mgr Grp';
v_group_name4 pace_masterdbo.pace_user_groups.group_name%type := 'Client Srvc Grp';
v_group_name5 pace_masterdbo.pace_user_groups.group_name%type := 'Client Srvc Mgr Grp';
v_group_name6 pace_masterdbo.pace_user_groups.group_name%type := 'Data Mgmt Grp';
v_group_name7 pace_masterdbo.pace_user_groups.group_name%type := 'Data Services Grp';
v_group_name8 pace_masterdbo.pace_user_groups.group_name%type := 'Dom Operations (FDS)';
v_group_name9 pace_masterdbo.pace_user_groups.group_name%type := 'QA Portfolio Mgr Grp';
v_group_name10 pace_masterdbo.pace_user_groups.group_name%type := 'SRS (LPS) Group';
v_group_name11 pace_masterdbo.pace_user_groups.group_name%type := 'LG Cap Val PM Group';
v_group_name12 pace_masterdbo.pace_user_groups.group_name%type := 'APL Large Cap Value';
v_group_name13 pace_masterdbo.pace_user_groups.group_name%type := 'Small Cap PM Grp';
v_group_name14 pace_masterdbo.pace_user_groups.group_name%type := 'Client Rptg Dev Grp';
v_entity_name rulesdbo.entity.entity_name%type; -- HX 17MAR05
** Checks to see if entity exists
PROCEDURE validate_entityid(p_acctid IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_acctid_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
l_entity_id OUT rulesdbo.entity_xreference.entity_id%TYPE,
b_valid OUT BOOLEAN)
IS
BEGIN
select ex.entity_id into l_entity_id
from rulesdbo.entity_xreference ex, rulesdbo.entity e
where ex.xref_account_id = trim(p_acctid)
and ex.xref_account_id_type = trim(p_acctid_type)
and ex.entity_id = e.entity_id;
b_valid:=TRUE;
EXCEPTION
WHEN NO_DATA_FOUND THEN
b_valid:=TRUE;
l_entity_id:=null;
dbms_output.put_line('IN ENTITY VALIDATE no data');
WHEN OTHERS THEN
dbms_output.put_line('IN ENTITY VALIDATE ERROR');
b_valid:=FALSE;
END; -- validate entity id func ends here
** Checks to see if entity xref exists, if not then add xref
FUNCTION entity_xref(p_acctid rulesdbo.entity_xreference.xref_account_id%TYPE,
p_acctid_type rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_entity_id rulesdbo.entity_xreference.entity_id%TYPE)
RETURN BOOLEAN
AS
l_count NUMBER:=0;
v_entity_xref_id rulesdbo.entity_xreference.instance%type;
BEGIN
select count(*) into l_count
from rulesdbo.entity_xreference
where xref_account_id = trim(p_acctid)
and xref_account_id_type = trim(p_acctid_type);
if l_count > 0 then
UPDATE rulesdbo.entity_xreference
SET update_date = v_date,
update_source = v_update_source,
entity_id = p_entity_id
WHERE xref_account_id = trim(p_acctid)
AND xref_account_id_type = trim(p_acctid_type);
RETURN TRUE;
else
pace_masterdbo.getnextinstance('RULESDBO.ENTITY_XREFERENCE',1,v_entity_xref_id);
INSERT INTO rulesdbo.entity_xreference
instance, update_date, update_source, entity_id, xref_account_id, xref_account_id_type
VALUES
v_entity_xref_id, v_date, v_update_source, p_entity_id, trim(p_acctid), trim(p_acctid_type)
RETURN TRUE;
end if;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END; -- entity_xref func ends here
** Finds dictionary_id given dictionary_name
FUNCTION getDictionaryId(p_dict_name IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_dict_id OUT rulesdbo.dictionaries.dictionary_id%TYPE)
RETURN BOOLEAN
AS
v_dict_id rulesdbo.dictionaries.dictionary_id%type;
v_dict_name rulesdbo.dictionaries.dictionary_name%type;
BEGIN
dbms_output.put_line('dictionary_name = '||p_dict_name);
--trim input
v_dict_name := trim(p_dict_name);
select dictionary_id into v_dict_id
from rulesdbo.dictionaries
where dictionary_name = v_dict_name;
dbms_output.put_line('dictionary_id = '||v_dict_id);
if v_dict_id is not null then
p_dict_id := v_dict_id;
RETURN TRUE;
else
p_dict_id := NULL;
RETURN FALSE;
end if;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END; -- getDictionaryId func ends here
** Finds dictionary_detail_id given dictionary_name
FUNCTION getDictionaryItemId(p_dict_id IN rulesdbo.dictionary_detail.dictionary_id%TYPE,
p_dict_l1_code_value IN rulesdbo.dictionary_detail.dict_l1_code_value%TYPE,
p_dict_l2_code_value IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_dict_item_id OUT rulesdbo.dictionary_detail.dictionary_item_id%TYPE)
RETURN BOOLEAN
AS
v_dict_item_id rulesdbo.dictionary_detail.dictionary_item_id%type;
v_dict_l1 rulesdbo.dictionary_detail.dict_l1_code_value%TYPE;
v_dict_l2 rulesdbo.dictionary_detail.dict_l2_code_value%TYPE;
BEGIN
--trim input
v_dict_l1 := trim(p_dict_l1_code_value);
v_dict_l2 := trim(p_dict_l2_code_value);
/* Total Level Only dictionary custom logic */
if v_dict_l2 <> 'TOTAL' then
select dictionary_item_id into v_dict_item_id
from rulesdbo.dictionary_detail
where dictionary_id = p_dict_id
and dict_l1_code_value = v_dict_l1
and dict_l2_code_value = v_dict_l2;
else
select dictionary_item_id into v_dict_item_id
from rulesdbo.dictionary_detail
where dictionary_id = p_dict_id
and dict_l1_code_value = v_dict_l1
and dict_l2_code_value is null;
end if;
if v_dict_item_id is not null then
p_dict_item_id := v_dict_item_id;
RETURN TRUE;
else
p_dict_item_id := NULL;
RETURN FALSE;
end if;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END; -- getDictionaryDetailId func ends here
** Finds instance for given source short_desc
FUNCTION getSourceId(p_source_name IN pace_masterdbo.interfaces.short_desc%TYPE,
p_source_id OUT pace_masterdbo.interfaces.instance%TYPE)
RETURN BOOLEAN
AS
v_source_id pace_masterdbo.interfaces.instance%TYPE;
v_source_name pace_masterdbo.interfaces.short_desc%TYPE;
BEGIN
--trim input
v_source_name := trim(p_source_name);
select instance into v_source_id
from pace_masterdbo.interfaces
where short_desc = v_source_name;
if v_source_id is not null then
p_source_id := v_source_id;
RETURN TRUE;
else
p_source_id := NULL;
RETURN FALSE;
end if;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END; -- getSourceId func ends here
** Finds entity_id given xref_account_id
FUNCTION getEntityId( p_account_id IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_account_id_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_entity_id OUT rulesdbo.entity_xreference.entity_id%TYPE)
RETURN BOOLEAN
AS
v_entity_id rulesdbo.entity_xreference.entity_id%TYPE;
v_account_id rulesdbo.entity_xreference.xref_account_id%TYPE;
v_account_id_type rulesdbo.entity_xreference.xref_account_id_type%TYPE;
BEGIN
--trim input
v_account_id := trim(p_account_id);
v_account_id_type := trim(p_account_id_type);
select entity_id into v_entity_id
from rulesdbo.entity_xreference
where xref_account_id = v_account_id
and xref_account_id_type = v_account_id_type;
if v_entity_id is not null then
p_entity_id := v_entity_id;
RETURN TRUE;
else
p_entity_id := NULL;
RETURN FALSE;
end if;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END; -- getEntityId func ends here
** FOR BLENDED BENCHMARKS ONLY
FUNCTION processLevel( p_level_id IN NUMBER,
p_blend_entity_id IN rulesdbo.entity.entity_id%TYPE,
p_target_dict_id IN rulesdbo.dictionaries.dictionary_id%TYPE,
p_dict_level IN rulesdbo.custom_index_attributes.dict_level%TYPE,
p_dict_l2_code_value1 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref1 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref1_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname1 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight1 IN rulesdbo.custom_index_attributes.weight%TYPE
RETURN BOOLEAN
AS
l_count NUMBER:=0;
v_instance rulesdbo.custom_index_attributes.instance%TYPE;
v_source_dict_id rulesdbo.custom_index_attributes.source_dict_id%TYPE;
v_entity_id rulesdbo.entity.entity_id%TYPE;
v_src_intfc_inst rulesdbo.custom_index_attributes.src_intfc_inst%TYPE;
v_target_dict_item_id rulesdbo.custom_index_attributes.target_dict_item_id%TYPE;
b_valid BOOLEAN;
BEGIN
b_valid := getSourceId('EAGLE PACE', v_src_intfc_inst);
dbms_output.put_line('Source Id = '||v_src_intfc_inst);
b_valid := getEntityId(p_entity_xref1, p_entity_xref1_type, v_entity_id);
dbms_output.put_line('Level Entity Xref = '||p_entity_xref1);
dbms_output.put_line('Level Entity Id = '||v_entity_id);
IF NOT b_Valid THEN
na_outparam(na_outparam.COUNT+1) := EagleGen.GetErrEdit(p_Src => v_src_intfc_inst,
p_ShortDesc => 'ENTITY NF');
p_OUT := EagleGen.simf_table_to_varchar(na_outparam);
RETURN FALSE;
END IF;
b_valid := getDictionaryId(p_source_dictname1, v_source_dict_id);
dbms_output.put_line('Level Dictionary Id = '||v_source_dict_id);
IF NOT b_Valid THEN
na_outparam(na_outparam.COUNT+1) := EagleGen.GetErrEdit(p_Src => v_src_intfc_inst,
p_ShortDesc => 'DICT ID NF');
p_OUT := EagleGen.simf_table_to_varchar(na_outparam);
RETURN FALSE;
END IF;
b_valid := getDictionaryItemId(p_target_dict_id, v_bb_dict_l1_cv, p_dict_l2_code_value1, v_target_dict_item_id);
dbms_output.put_line('Dictionary Item Id = '||v_target_dict_item_id);
IF NOT b_Valid THEN
na_outparam(na_outparam.COUNT+1) := EagleGen.GetErrEdit(p_Src => v_src_intfc_inst,
p_ShortDesc => 'DIR NF');
p_OUT := EagleGen.simf_table_to_varchar(na_outparam);
RETURN FALSE;
END IF;
/* initial delete */
if p_level_id = 1 then
dbms_output.put_line('Deleting ALL prior blend info');
DELETE FROM rulesdbo.custom_index_attributes
WHERE entity_id = p_blend_entity_id
and target_dict_id = p_target_dict_id
and source_dict_id = v_source_dict_id
and dict_level = p_dict_level;
end if;
/* verify level */
if p_dict_l2_code_value1 is not null then
if (v_entity_id is not null) then
if (v_source_dict_id is not null) then
if (p_weight1 is not null) then
dbms_output.put_line('*** LEVEL '||p_level_id||' - INSERTING NEW RECORD INTO RULESDBO.CUSTOM_INDEX_ATTRIBUTES');
pace_masterdbo.getnextinstance('RULESDBO.CUSTOM_INDEX_ATTRIBUTES',1,v_instance);
dbms_output.put_line('Retrieved instance number = '||v_instance);
/* insert row */
INSERT INTO rulesdbo.custom_index_attributes (
instance, effective_date, entity_id, entity_detail_id, target_dict_id, source_dict_id,
dict_level, dict_level_value, weight, cust_indx_type, src_intfc_inst, update_date,
update_source, target_dict_item_id
VALUES (
v_instance, trunc(v_date), p_blend_entity_id, v_entity_id, p_target_dict_id, v_source_dict_id,
p_dict_level, substr(p_dict_l2_code_value1, 1, 30), p_weight1, substr(p_cust_indx_type, 1, 4),
v_src_intfc_inst, v_date, v_update_source, v_target_dict_item_id
b_valid := TRUE;
RETURN TRUE;
end if;
end if;
end if;
end if;
RETURN FALSE;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('ERRROR - '||sqlerrm);
RETURN NULL;
END; -- processLevel func ends here
FUNCTION customIndexAttributes(
p_blend_entity_id IN rulesdbo.entity.entity_id%TYPE,
p_target_dictname IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_dict_l2_code_value1 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref1 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref1_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname1 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight1 IN rulesdbo.custom_index_attributes.weight%TYPE,
p_dict_l2_code_value2 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref2 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref2_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname2 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight2 IN rulesdbo.custom_index_attributes.weight%TYPE,
p_dict_l2_code_value3 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref3 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref3_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname3 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight3 IN rulesdbo.custom_index_attributes.weight%TYPE,
p_dict_l2_code_value4 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref4 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref4_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname4 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight4 IN rulesdbo.custom_index_attributes.weight%TYPE,
p_dict_l2_code_value5 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref5 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref5_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname5 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight5 IN rulesdbo.custom_index_attributes.weight%TYPE,
p_dict_l2_code_value6 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref6 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref6_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname6 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight6 IN rulesdbo.custom_index_attributes.weight%TYPE,
p_dict_l2_code_value7 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref7 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref7_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname7 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight7 IN rulesdbo.custom_index_attributes.weight%TYPE,
p_dict_l2_code_value8 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref8 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref8_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname8 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight8 IN rulesdbo.custom_index_attributes.weight%TYPE,
p_dict_l2_code_value9 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref9 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref9_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname9 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight9 IN rulesdbo.custom_index_attributes.weight%TYPE,
p_dict_l2_code_value10 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
p_entity_xref10 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
p_entity_xref10_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
p_source_dictname10 IN rulesdbo.dictionaries.dictionary_name%TYPE,
p_weight10 IN rulesdbo.custom_index_attributes.weight%TYPE
RETURN BOOLEAN
AS
l_count NUMBER:=0;
v_instance rulesdbo.custom_index_attributes.instance%TYPE;
v_target_dict_id rulesdbo.custom_index_attributes.target_dict_id%TYPE;
v_source_dict_id rulesdbo.custom_index_attributes.source_dict_id%TYPE;
v_entity_id rulesdbo.entity.entity_id%TYPE;
v_entity_detail_id rulesdbo.entity_detail.entity_detail_id%TYPE;
b_valid BOOLEAN;
BEGIN
dbms_output.put_line('TRYING TO INSERT NEW RECORD INTO RULESDBO.CUSTOM_INDEX_ATTRIBUTES');
b_valid := getDictionaryId(p_target_dictname, v_target_dict_id);
dbms_output.put_line('Target Dictionary Id = '||v_target_dict_id);
-- process level 1
if p_dict_l2_code_value1 is not null then
dbms_output.put_line('Trying to process level 1');
b_valid := processLevel(1,p_blend_entity_id,v_target_dict_id,p_dict_level,
p_dict_l2_code_value1,p_entity_xref1,p_entity_xref1_type,
p_source_dictname1,p_weight1);
end if;
-- process level 2
if p_dict_l2_code_value2 is not null then
dbms_output.put_line('Trying to process level 2');
b_valid := processLevel(2,p_blend_entity_id,v_target_dict_id,p_dict_level,
p_dict_l2_code_value2,p_entity_xref2,p_entity_xref2_type,
p_source_dictname2,p_weight2);
end if;
-- process level 3
if p_dict_l2_code_value3 is not null then
dbms_output.put_line('Trying to process level 3');
b_valid := processLevel(3,p_blend_entity_id,v_target_dict_id,p_dict_level,
p_dict_l2_code_value3,p_entity_xref3,p_entity_xref3_type,
p_source_dictname3,p_weight3);
end if;
-- process level 4
if p_dict_l2_code_value4 is not null then
dbms_output.put_line('Trying to process level 4');
b_valid := processLevel(4,p_blend_entity_id,v_target_dict_id,p_dict_level,
p_dict_l2_code_value4,p_entity_xref4,p_entity_xref4_type,
p_source_dictname4,p_weight4);
end if;
-- process level 5
if p_dict_l2_code_value5 is not null then
dbms_output.put_line('Trying to process level 5');
b_valid := processLevel(5,p_blend_entity_id,v_target_dict_id,p_dict_level,
p_dict_l2_code_value5,p_entity_xref5,p_entity_xref5_type,
p_source_dictname5,p_weight5);
end if;
-- process level 6
if p_dict_l2_code_value6 is not null then
dbms_output.put_line('Trying to process level 6');
b_valid := processLevel(6,p_blend_entity_id,v_target_dict_id,p_dict_level,
p_dict_l2_code_value6,p_entity_xref6,p_entity_xref6_type,
p_source_dictname6,p_weight6);
end if;
-- process level 7
if p_dict_l2_code_value7 is not null then
dbms_output.put_line('Trying to process level 7');
b_valid := processLevel(7,p_blend_entity_id,v_target_dict_id,p_dict_level,
p_dict_l2_code_value7,p_entity_xref7,p_entity_xref7_type,
p_source_dictname7,p_weight7);
end if;
-- process level 8
if p_dict_l2_code_value8 is not null then
dbms_output.put_line('Trying to process level 8');
b_valid := processLevel(8,p_blend_entity_id,v_target_dict_id,p_dict_level,
p_dict_l2_code_value8,p_entity_xref8,p_entity_xref8_type,
p_source_dictname8,p_weight8);
end if;
-- process level 9
if p_dict_l2_code_value9 is not null then
dbms_output.put_line('Trying to process level 9');
b_valid := processLevel(9,p_blend_entity_id,v_target_dict_id,p_dict_level,
p_dict_l2_code_value9,p_entity_xref9,p_entity_xref9_type,
p_source_dictname9,p_weight9);
end if;
-- process level 10
if p_dict_l2_code_value10 is not null then
dbms_output.put_line('Trying to process level 10');
b_valid := processLevel(10,p_blend_entity_id,v_target_dict_id,p_dict_level,
p_dict_l2_code_value10,p_entity_xref10,p_entity_xref10_type,
p_source_dictname10,p_weight10);
end if;
RETURN b_valid;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('ERRROR - '||sqlerrm);
RETURN NULL;
END; -- customIndexAttributes func ends here
** if record in entity Detail exists add else update master entity id
** benchmark entity_id = p_mast_entity_id
** portfolio entity_id = p_feed_entity_id
FUNCTION entityDetail( p_mast_entity_id rulesdbo.entity_detail.entity_detail_id%TYPE,
p_feed_entity_id rulesdbo.entity_detail.entity_id%TYPE,
p_entity_type rulesdbo.entity_detail.entity_type%TYPE,
p_list_order rulesdbo.entity_detail.list_order%TYPE)
RETURN BOOLEAN
AS
l_count NUMBER:=0;
a_count NUMBER:=0;
BEGIN
/* if blended benchmark don't need record in ENTITY_DETAIL */
if (p_entity_type = v_bb_entity_type) then
return TRUE;
end if;
select count(*) into l_count
from rulesdbo.entity_detail
where entity_id = p_feed_entity_id
and entity_type = p_entity_type
and entity_detail_id = p_mast_entity_id;
if l_count > 0 then
dbms_output.put_line('UPDATING EXISTING RECORD IN RULESDBO.ENTITY_DETAIL');
UPDATE rulesdbo.entity_detail
SET
update_date = v_date,
update_user = v_update_source,
src_intfc_inst = v_src_intfc_inst,
list_order = p_list_order
WHERE
entity_detail_id = p_mast_entity_id
AND entity_id = p_feed_entity_id
AND entity_type = p_entity_type;
RETURN TRUE;
else
/* validate associated entity_id */
dbms_output.put_line('VALIDATING ASSOCIATED ENTITY_ID');
dbms_output.put_line('p_feed_entity_id ' || p_feed_entity_id);
select count(*) into a_count
from rulesdbo.entity
where entity_id = p_feed_entity_id;
if a_count > 0 then
dbms_output.put_line('INSERTING NEW RECORD INTO RULESDBO.ENTITY_DETAIL');
INSERT INTO rulesdbo.entity_detail
entity_detail_id, entity_id, entity_type, update_date, update_user, src_intfc_inst, list_order
VALUES
p_mast_entity_id, p_feed_entity_id, p_entity_type, v_date, v_update_source, v_src_intfc_inst, p_list_order
RETURN TRUE;
else
IF p_feed_entity_id is not null then
--For invalid, non-null associated_entity_id
RETURN FALSE;
END IF;
--For invalid, null associate_entity_id
return TRUE;
end if;
return TRUE;
end if;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END; -- entityDetail func ends here
** FOR BUSINESS GROUPS
FUNCTION setBusinessGroup
( p_group_name pace_masterdbo.pace_user_groups.group_name%TYPE,
p_entity_id rulesdbo.entity.entity_id%TYPE,
p_upd_user pace_masterdbo.pace_user_groups.upd_user%TYPE,
p_upd_datetime pace_masterdbo.pace_user_groups.upd_datetime%TYPE
RETURN BOOLEAN
AS
g_count NUMBER:=0;
v_group_id pace_masterdbo.pace_user_groups.group_id%TYPE;
BEGIN
/* validate that business group is found */
select count(*) into g_count
from pace_masterdbo.pace_user_groups
where group_name = p_group_name;
if g_count <= 0 then
dbms_output.put_line('BUSINESS GROUP NOT FOUND - ' || p_group_name);
return FALSE;
end if;
/* get group_id for given group name */
select group_id into v_group_id
from pace_masterdbo.pace_user_groups
where group_name = p_group_name;
/* check if record already exists in group_entities */
select count(*) into g_count
from pace_masterdbo.group_entities
where group_id = v_group_id
and entity_id = p_entity_id;
if g_count > 0 then
/* update record */
UPDATE pace_masterdbo.group_entities
SET upd_user = p_upd_user,
upd_datetime = p_upd_datetime
WHERE group_id = v_group_id
AND entity_id = p_entity_id;
dbms_output.put_line('UPDATED RECORD FOR BUSINESS GROUP - ' || p_group_name);
else
/* insert record */
INSERT INTO pace_masterdbo.group_entities
( group_id, entity_id, upd_user, upd_datetime )
VALUES
( v_group_id, p_entity_id, p_upd_user, p_upd_datetime );
dbms_output.put_line('INSERTED NEW RECORD FOR BUSINESS GROUP - ' || p_group_name);
end if;
RETURN TRUE;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END; -- setBusinessGroup func ends here
** MAIN
BEGIN
-- HX 17MAR05
v_entity_name := substr(p_entity_name,1,30);
v_entity_name := translate(v_entity_name,'/\:*?"<>~`!^|;,.''',' ');
b_valid := getSourceId('EAGLE PACE', g_prf_intfc);
dbms_output.put_line('Global Source Id = '||g_prf_intfc);
validate_entityid(p_source_acct_id,p_source_system,v_entity_id, b_valid);
IF NOT b_Valid THEN
na_outparam(na_outparam.COUNT+1) := EagleGen.GetErrEdit(p_Src => g_prf_intfc,
p_ShortDesc => 'INV ENTITY');
p_OUT := EagleGen.simf_table_to_varchar(na_outparam);
RETURN;
END IF;
if v_entity_id is not null then
dbms_output.put_line('ENTITY ID EXISTS - ' || v_entity_id);
/*Update Record in Entity Table */
UPDATE rulesdbo.entity
SET entity_type = p_entity_type,
entity_name = v_entity_name,
entity_long_name = substr(p_entity_long_name,1,60),
legal_name = p_entity_legal_name,
inception_date = to_date(p_inception_date, 'YYYYMMDD'),
marketing_open_date = to_date(p_marketing_open_date, 'YYYYMMDD'),
fiscal_end_date = to_date(p_fiscal_end_date, 'YYYYMMDD'),
tax_id_number = p_tax_id_number,
upd_date = v_date,
upd_user = v_update_source,
base_currency = p_base_currency,
account_status = p_account_status,
entity_code = p_entity_code,
orig_source_system = p_orig_source_system,
account_legal_form = p_account_legal_form,
business_sector = p_business_sector,
direct_account_ind = p_direct_account_ind,
portfolio_type_code = p_portfolio_type_code,
ml_interpolate_yn = p_ml_interpolate_yn
WHERE entity_id = v_entity_id;
dbms_output.put_line('UPDATED EXISTING RULESDBO.ENTITY RECORD');
b_valid := entityDetail(v_entity_id, p_associated_entity_id, p_entity_type, p_list_order);
else
pace_masterdbo.getnextinstance('RULESDBO.ENTITY',1,v_entity_id);
/*Insert Record into Entity Table */
INSERT INTO rulesdbo.entity
entity_id, entity_type, entity_name,entity_long_name,legal_name,inception_date,marketing_open_date,
upd_date, upd_user, tax_id_number, fiscal_end_date, base_currency, account_status,
entity_code, orig_source_system, account_legal_form, business_sector, direct_account_ind,
portfolio_type_code, ml_interpolate_yn
VALUES
( v_entity_id, p_entity_type,v_entity_name,substr(p_entity_long_name,1,60),p_entity_legal_name,
to_date(p_inception_date, 'YYYYMMDD'),to_date(p_marketing_open_date, 'YYYYMMDD'),v_date, v_update_source, p_tax_id_number, to_date(p_fiscal_end_date, 'YYYYMMDD'),
p_base_currency, p_account_status, p_entity_code, p_orig_source_system, p_account_legal_form, p_business_sector,
p_direct_account_ind, p_portfolio_type_code, p_ml_interpolate_yn
dbms_output.put_line('ENTITY ID CREATED - ' || v_entity_id);
/*Insert Record into Entity_Detail Table */
b_valid := entityDetail(v_entity_id, p_associated_entity_id, p_entity_type, p_list_order);
end if;
/* Insert/Update CUSTOM_INDEX_ATTRIBUTES if blended benchmark */
if (p_entity_type = v_bb_entity_type) then
b_valid := customIndexAttributes(
v_entity_id,
p_target_dict_name,
p_source_level1,
p_source_entity_xref1,
p_source_entity_xref1_type,
p_source_dict_name1,
p_weight1,
p_source_level2,
p_source_entity_xref2,
p_source_entity_xref2_type,
p_source_dict_name2,
p_weight2,
p_source_level3,
p_source_entity_xref3,
p_source_entity_xref3_type,
p_source_dict_name3,
p_weight3,
p_source_level4,
p_source_entity_xref4,
p_source_entity_xref4_type,
p_source_dict_name4,
p_weight4,
p_source_level5,
p_source_entity_xref5,
p_source_entity_xref5_type,
p_source_dict_name5,
p_weight5,
p_source_level6,
p_source_entity_xref6,
p_source_entity_xref6_type,
p_source_dict_name6,
p_weight6,
p_source_level7,
p_source_entity_xref7,
p_source_entity_xref7_type,
p_source_dict_name7,
p_weight7,
p_source_level8,
p_source_entity_xref8,
p_source_entity_xref8_type,
p_source_dict_name8,
p_weight8,
p_source_level8,
p_source_entity_xref9,
p_source_entity_xref9_type,
p_source_dict_name9,
p_weight9,
p_source_level10,
p_source_entity_xref10,
p_source_entity_xref10_type,
p_source_dict_name10,
p_weight10
end if;
/* Insert/Update Business Groups */
b_valid := setBusinessGroup(v_group_name1, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name2, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name3, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name4, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name5, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name6, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name7, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name8, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name9, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name10, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name11, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name12, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name13, v_entity_id, v_update_source, v_date);
b_valid := setBusinessGroup(v_group_name14, v_entity_id, v_update_source, v_date);
/* Insert/Update entity xref */
b_valid := entity_xref(p_source_acct_id, p_source_system, v_entity_id);
IF NOT b_Valid THEN
dbms_output.put_line('INV ENT XREF 1');
na_outparam(na_outparam.COUNT+1) := EagleGen.GetErrEdit(p_Src => g_prf_intfc,
p_ShortDesc => 'INV ENT XREF');
p_OUT := EagleGen.simf_table_to_varchar(na_outparam);
RETURN;
END IF;
COMMIT;
/* Pass back any warning messages */
p_out := EagleGen.simf_table_to_varchar(na_outparam);
END; -- End of ProcedureThe PLS-00306 error is normally a runtime error. It is telling you that the call to procedure ENTPRFMAN had either too few or too many parameters passed to it or that one or more of the parameters were of the wrong datatype.
HTH -- Mark D Powell -- -
ORA-06550: Ligne 1, colonne 34 : PLS-00103 In Validation Item with APEX 4
Hello,
I am using APEX 4?
i have created ths program to validate an item
DECLARE
LONGEUR1 NUMBER;
BEGIN
Select LONGEUR INTO LONGEUR1 FROM OUVRAGE WHERE code_ouvrage = (select code_ouvrage from ouvrage where libelle = :P6_CODE_OUVRAGE);
IF :P6_PK < 0 or :P6_PK > LONGEUR1 THEN
RETURN FALSE;
ELSE
RETURN TRUE;
END IF;
END;
i have had thir error message when running page :
ORA-06550: Ligne 1, colonne 34 : PLS-00103: Symbole "DECLARE" rencontré à la place d'un des symboles suivants : ( ) - + case mod new not null others table avg count current exists max min prior sql stddev sum variance execute multiset the both leading trailing forall merge year month DAY_ hour minute second timezone_hour timezone_minute timezone_region timezone_abbr time timestamp interval date
ERR-1025 Error processing PLSQL expression. DECLARE LONGEUR1 NUMBER; BEGIN Select LONGEUR INTO LONGEUR1 FROM OUVRAGE WHERE code_ouvrage = (select code_ouvrage from ouvrage where libelle = :P6_CODE_OUVRAGE); IF :P6_PK < 0 or :P6_PK > LONGEUR1 THEN RETURN FALSE; ELSE RETURN TRUE; END IF; END;
Any siggestion please ?ouadah wrote:
Hello,
I am using APEX 4?
i have created ths program to validate an item
DECLARE
LONGEUR1 NUMBER;
BEGIN
Select LONGEUR INTO LONGEUR1 FROM OUVRAGE WHERE code_ouvrage = (select code_ouvrage from ouvrage where libelle = :P6_CODE_OUVRAGE);
IF :P6_PK < 0 or :P6_PK > LONGEUR1 THEN
RETURN FALSE;
ELSE
RETURN TRUE;
END IF;
END;
i have had thir error message when running page :
ORA-06550: Ligne 1, colonne 34 : PLS-00103: Symbole "DECLARE" rencontré à la place d'un des symboles suivants : ( ) - + case mod new not null others table avg count current exists max min prior sql stddev sum variance execute multiset the both leading trailing forall merge year month DAY_ hour minute second timezone_hour timezone_minute timezone_region timezone_abbr time timestamp interval date
ERR-1025 Error processing PLSQL expression. DECLARE LONGEUR1 NUMBER; BEGIN Select LONGEUR INTO LONGEUR1 FROM OUVRAGE WHERE code_ouvrage = (select code_ouvrage from ouvrage where libelle = :P6_CODE_OUVRAGE); IF :P6_PK < 0 or :P6_PK > LONGEUR1 THEN RETURN FALSE; ELSE RETURN TRUE; END IF; END;
Any siggestion please ?What is the Validation Type? It looks like you are attempting to use code for a Function Returning Boolean validation in one of type PL/SQL Expression.
Ensure the Validation Type is Function Returning Boolean. -
Error with the PL/SQL below as ORA-06550: line 35, column 3
declare
c pls_integer := 0;
l_detail varchar2(4000);
i pls_integer;
l pls_integer;
l_max_rows integer;
begin
l_max_rows := nvl(:P2_ROWS,10);
if :P2_SEARCH is null
and :P2_LastName is null
and :P2_FirstName is null
and P2_Course is null
then
sys.htp.p('<p>'||
apex_escape.html('Please enter at least one search condition.')||
'</p>');
else
-- PUT YOUR QUERY HERE
for c1 in (
select Student.Student_id,
Student.First_NAME,
Student.LAST_NAME,
Student.Email1 as Primaryemail,
Student.Email2 as SecondaryEmail,
Student.Phone1 as MobileNumber,
Student.Phone2 as HomeNumber,
Address.Street1 as Street ,
Address.City as City,
Address.State as State,
Address.ZIP as Zip,
INSTITUTION.Name as InstName,
Course.Course_Name as Course,
from Student Inner join Address on Student.ADDR_ID = Address.ID
Inner Join Institution on Student.INST_ID = Institution.ID
Inner join Course on Course.INST_ID = Institution.ID
where ( instr(upper(LAST_NAME),upper(:P2_LastName)) > 0
or :P2_LastName is null)
and ( instr(upper(FIRST_NAME),upper(:P2_FirstName)) > 0
or :P2_FirsTName is null)
and ( instr(upper(Course_Name),upper(:P2_Course)) > 0
or :P2_Course is null)
and (
instr(upper(First_NAME),upper(:P2_SEARCH)) > 0
or instr(upper(LAST_NAME),upper(:P2_SEARCH)) > 0
or instr(upper(Coure_Name),upper(:P2_SEARCH)) > 0
or :P2_SEARCH is null
loop
c := c + 1;
if c = 1 then
sys.htp.p('<ul class="sSearchResultsReport">');
end if;
sys.htp.p('<li>');
sys.htp.prn('<span class="title">');
-- DEFINE DRILL DOWN LINK HERE
sys.htp.prn('<a href="'
||apex_util.prepare_url('f?p='||:APP_ID||':3:'||:APP_SESSION||
':::3:P3_Student_ID:'||c1.Student_ID)||'">');
-- ASSIGN PRIMAY ATTRIBUTE HERE, REFERENCE QUERY COLUMN
l_detail := c1.Student_ID;
i := instr(upper(l_detail),upper(:P2_SEARCH));
if i > 0 then
l := length(:P2_SEARCH);
l_detail := apex_escape.html(substr(l_detail,1,i-1))||
'<span class="highlight">'||
apex_escape.html(substr(l_detail,i,l))||'</span>'||
apex_escape.html(substr(l_detail,i+l));
end if;
sys.htp.prn(l_detail);
sys.htp.prn('</a></span>');
sys.htp.prn('<span class="description">');
-- ASSIGN SECONDARY ATTRIBUTE HERE, REFERENCE QUERY COLUMN
-- l_detail := c1._NAME;
-- i := instr(upper(l_detail),upper(:P2_SEARCH));
--if i > 0 then
--l := length(:P2_SEARCH);
--l_detail := apex_escape.html(substr(l_detail,1,i-1))||
--'<span class="highlight">'||
--apex_escape.html(substr(l_detail,i,l))||'</span>'||
--apex_escape.html(substr(l_detail,i+l));
--end if;
--sys.htp.prn(l_detail);
--sys.htp.prn('</span>');
-- DEFINE ADDITIONAL QUERY COLUMNS FOR SEARCH BELOW
sys.htp.p('<span class="type">');
sys.htp.prn(apex_escape.html(c1.LAST_NAME));
sys.htp.prn('</span>');
-- display additional column detail
sys.htp.p('<br /><span class="type">');
sys.htp.prn(apex_escape.html(c1.FIRST_NAME));
sys.htp.prn('</span>');
-- display additional column detail
sys.htp.p('<br /><span class="type">');
sys.htp.prn(apex_escape.html(c1.PrimaryEmail ));
sys.htp.prn('</span>');
--Edited by: user13133295 on Jun 3, 2013 2:55 PMTry formating your code using SQL Developer or Toad. If you post your code in this forum, enclose it between square brackets like this:
[code]
Your formated code goes here...
[/code]
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
https://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
-------------------------------------------------------------------
Maybe you are looking for
-
IPhone 4 won't turn on unless it's plugged in.
My iPhone won't turn on unless it's plugged into either my speaker dock or a portable charging phone case and even then, it gets stuck on a reset loop about five times before it fully turns on. When it does turn on, it tells me to activate the phone
-
I am upgrading my phone from 4-s to 5. Will the i-cloud reinstall my old applications, or will I need to manually download and install each application myself?
-
Dear experts, pls explain MRP view 4 - Follow-up matl field? what use? how to use? Regards, Sankaran
-
OS 10.8.3 can't connect to Apple TV through Airport
I have an Apple TV, MacBook Pro, iPad, iPhone all on an Airport WiFi network. I can control the Airport or use the Airport for Airplay form both my iPhone and my iPad, but cannot from my MacBook Pro. So, this leads me to think there is a software i
-
Is it ok to download adobe flash on my macbook air?
I'm trying to complete a photobook that I started on snapfish on my old PC, on my new macbook air. It's prompting me to download the latest adobe flash, is it safe to do so on my macbook air?