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 || multiset

Here 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;

Similar Messages

  • 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,
    Vinod

    So 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

  • Backing up the RAC DB when either one of the node is down

    11.2.0.2/Solaris 10 (x86-64bit) For our 2-Node production RAC DB, I had configured RMAN backup from Node1 using Cronjob. Last weekend our Node1 went down. Our SMS notifying system which sends SMS alerts to our Mobiles went down on the weekend as well. Only by Monday Noon we came to know that Node1 is down and that there is no backup for Saturday and Sunday.
    How can i make sure that RMAN backup of the DB will be taken even if either one of the Nodes go down ? My friend suggested IBM TWS scheduler. Can Tivoli Work Scheduler detect a dead RAC Node and fire RMAN backup from the surviving node ?

    I don't know the answer regarding TWS, but if you run the backup from crontab I guess that you don't have any 3rd party tool now.
    I think the easiest solution will be to have the script and crontab job on both servers and decide which one runs the backup.
    For example, the script that is scheduled in the crontab will do:
    1. if $HOSTNAME is node1 run the backup. If $HOSTNAME is node2, check if node1 is up and if not run the backup.
    2. This is more elegant, check the "crsctl status resource" for something and run the backup accordingly. For example, the script will check where SCAN1 VIP is located and this is the node which will run the backup.
    HTH
    Liron

  • 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)

  • 11g R1 problem... PLS-00103: Encountered the symbol "¿" when expecting...

    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.

  • 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án

    Nestor,
    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.

  • 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 query

    something 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

  • Error: Encountered a SELECT WHEN EXPECTING the following ( + - all mod num

    I have a conditional INSERT statement where I update the record if todays date is found in the table or i will INSERT a new record if that date is not found..
    Insert statement that comes after ELSE works fine but IF part fails with the error
    encountered a select when expecting the following
    *( - + all case mod new null.. and lot more*
    IF EXISTS
    (SELECT (TO_CHAR(UpdateDate, 'MM/DD/YYYY')) FROM EmployeeUpdateEmails
         WHERE UpdateDate = select (TO_CHAR(sysdate, 'MM/DD/YYYY')) from dual)
         UPDATE EMPLOYEEUPDATEEMAILS
    SET EMP_MGR_TOTAL_CHANGES = total
         WHERE UpdateDate = select (TO_CHAR(sysdate, 'MM/DD/YYYY')) from dual
    ELSE
    This is how EmployeeUpdateEmails table is created
    CREATE TABLE EmployeeUpdateEmails
    UpdateNum SMALLINT          PRIMARY KEY,
    UpdateDate               DATE,
    Emp_Mgr_Total_Changes SMALLINT,
    Emp_Term_Total_Chnages SMALLINT
    Please Help

    IF EXISTS is not aproppriate syntax:
    SQL> declare
      2  begin
      3   if exists (select count(*) from dual)
      4   then
      5     dbms_output.put_line('it exists');
      6   else
      7     dbms_output.put_line('it doesn''t exist');
      8   end if;
      9  end;
    10  /
    if exists (select count(*) from dual)
    ERROR at line 3:
    ORA-06550: line 3, column 5:
    PLS-00204: function or pseudo-column 'EXISTS' may be used inside a SQL statement only
    ORA-06550: line 3, column 2:
    PL/SQL: Statement ignored
    SQL> declare
      2   my_var number; 
      3  begin
      4  
      5   select count(*) into my_var
      6   from   dual;
      7  
      8   if my_var >= 1
      9   then
    10     dbms_output.put_line('it exists');
    11   else
    12     dbms_output.put_line('it doesn''t exist');
    13   end if;
    14  end;
    15  /
    it exists
    PL/SQL procedure successfully completed.If you're using SQL then
    1) post the complete statement
    2) mention your database version ( the result of: select * from v$version; )
    3) consider using CASE:
    SQL> select case
      2           when (select count(*) from dual) >= 1
      3           then 'it exists'
      4           else 'it doesn''t exist'
      5         end
      6  from   dual;
    CASEWHEN(SELECTC
    it exists
    1 row selected.

  • I am using Illustrator CS5. I am using a certain font and when I make a selection to use one of the letter options or a glyph, it does not take my selection; in other words, nothing changes.

    I am using Illustrator CS5. I am using a certain font and when I make a selection to use one of the letter options or a glyph, it does not take my selection; in other words, nothing changes.

    What font? What system? What Glyph? What language settings? Could be anything. Either way, ask in the AI forum. You'll get quicker answers there - if you provide all the required info.
    Mylenium

  • I can see the pics but when I click on the event itself a HUGE exclamation mark pops up and not my pic.

    OK..this forum help me locate my iPhoto so HOPEFULLY ya'll can help me w/ 1 another issue. When I open an event in iPhoto...I can see the pics but when I click on the event itself a HUGE exclamation mark pops up and not my pic. Its really weird that I can see the pic but cant open it. Hopefully we can correct this issue. Also, if anyone has the energy....pls tell me how I can export from my iphoto-I want to place all my pics on CDs or my external hard drive and when I try to export it says.."unable to export.." I dunno!
    Help PLZZZZZ!
    Lost again,
    Amanda 

    The two problems are related.
    The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
    And that's why you can't export as well.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • HT2513 How do you change the name of a reminder in the reminder list.  I right click and then choose "get information"  I can change the colour of the reminder but when I type in the name that I want and then press enter the name stays as "untitled".

    How do you change the name of a reminder in the reminder list.  I right click and then choose "get information"  I can change the colour of the reminder but when I type in the name that I want and then press enter the name stays as "untitled"

    Jerry,
    Thanks for replying again. I've got a little bit further thanks to you. I tried the US keyboard layout as you seemed pretty definte that it should work. This time I applied the setting and also started the language toolbar and selected it from there.
    Hey presto, I've got the @ where it should be. Excellent.
    However the single quote ' works in a weird way. When I press it, it doesn't show up on the screen. But when I press another key, I get the single quote plus the next key I press. When I press the single quote twice, I get 2 of them. This is also the same with the SHIFT ' key. i.e. for the double quotes.
    Very strange. I'll look at other keyboards and see where that gets me.
    Thanks,  Maz

  • HT1923 When I try to uninstall iTunes I get a message saying iTunes 64 msi can not be located and I should enter an alternate path. How would I know where it it is? I get the same message when trying to install the update to iTunes 10.6.1.

    When I try to uninstall iTunes I get a message saying iTunes 64 msi can not be located and I should enter an alternate path. How would I know where it it is? I get the same message when trying to install the update to iTunes 10.6.1.

    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • The tools on Adobe Photoshop Elements 9 seemed to have frozen. The crop symbol is 3 of the symbols nest to each other. The hand move tool is not one hand but 3 next to each other. Other tools won't work at all. Really nice!

    Ya, okay ! I use a number of PSE programs, one of which is PSE 9. The tools for some reason seem to have frozen. When I use the move tool I don't get just one hand but 3 hand symbols all next to each other. Same thing with the crop tool, I don't get one symbol but 3 all next to each other. There are a couple of tools that just don't work at all.  It's like the PSE 9 got hit with some virus or sorts. Oh well, live and learn.  Trying to get through to tech service is next to impossible.

    Have you seen this other thread you started about this problem?
    Photoshop Elements 9 is messed up.
    Did you use Barbara's fix?
    It would be less confusing if you only posted this question once, not three times:
    HOW DO I RESET ALL THE TOOLS IN PSE 9 ? THE CURSOR IS REALLY MESSED UP AND DOES NOT WORK WITH THE TOOLS. I TOUCH THE HAND AND I GET 3 HANDS, I TRY TO USE THE CROP AND I GET 3 SMALL CIRCLES.  THE CURSOR IS REALLY MESSED UP. DO I HAVE TO GET ANOTHER PSE 9 ?
    Photoshop Elements 9 is messed up.
    The tools on Adobe Photoshop Elements 9 seemed to have frozen. The crop symbol is 3 of the symbols nest to each other. The hand move tool is not one hand but 3 next to each other. Other tools won't work at all. Really nice!

  • Hey ppl,my macbook is not booting and by that i mean u can hear the audio wave when its starting up,the screen goes white and then after a while there's a folder with a question mark in the middle of the screen...anyone,any ideea?!?

    Hey ppl,my macbook is not booting and by that i mean u can hear the audio wave when its starting up,the screen goes white and then after a while there's a folder with a question mark in the middle of the screen...anyone,any ideea?!?Regards.

    That folder with the question mark icon means that the MacBook can't find the boot directory. That can either mean it can't find the hard drive or the hard drive data is somehow corrupted.
    Put your install DVD into the drive and reboot. As soon as you hear the boot chime, hold down the "c" key on your keyboard (or the Option key until the Install Disk shows up). That will force your MacBook to boot from the optical drive.
    Once it has finished booting and you are at the Install screen launch Disk Utility from the Utilities menu. Is your Hard Drive in the list on the left?
    If it is then select the First Aid Tab run Repair Disk and if that repairs any problems run it again until the green OK appears and then run Repair Permissions.
    If your hard drive isn’t recognized in Disk Utility then your hard drive is probably dead.

Maybe you are looking for

  • Error in calling a javascript function

    Hi Below is a code from my HTML file... <html> <head> <script language="javascript" > function try() alert("hi"); </script> </head> <body> <input type="button" value="Hello world!" onclick='try();'> </body> </html>while running page in browser i m ge

  • Assign Project Code to Freight charges in AP Invoice

    Project Code field is not available in Freight Charges window at all though it can be displayed and edited by selecting Project Code to be visible and Active in Journal Entry Form Settings Table Format.  As this is a limitation in SAP B1 please feedb

  • Where can I get a website template that has good support?

    Hi I am new with the abode software. I have the creative cloub. However, I am not website designer. So, I would like to find something that I can work with that has some support to it. I know a little about building websites, but not much. I would li

  • Strange voice mail

     I have Prepaid Plus.  This evening I started to receive voice mails that were sent back in April. I remember receiving them back then, and deleting them.  Why would I start getting these voice mails now? And for some reason I can't find how to delet

  • 10.5.1 is out

    The 10.5.1 Update is recommended for all users running Mac OS X Leopard and includes general operating system fixes that enhance the stability, compatibility and security of your Mac. For detailed information on this update, please visit this website