Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Advisor Error for default value

devlarryMar 27 2019 — edited Apr 3 2019

Oracle 12c Application Express 5.1.4.00.08

I have a Text Field page item that I am setting the default value with PL/SQL. I'm not sure what is wrong. When I Validate it in the Code Editor I get "Validation successful". When I run Advisor I get the error: This needs to be a Text Field instead of a select list. A select list I could use SQL Query. Does anyone know what I am doing wrong? It works but it bugs me that there is an error. I have Googled this and searched this blog but have not found anything.

With the BEGIN END; in the Code.

Compilation error - ORA-06550: line 5, column 8:

PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following:

When I take the BEGIN END out I get the following error:

Compilation error - ORA-06550: line 5, column 8:

PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:

Default Type: PL/SQL Function Body

Body:

BEGIN

  SELECT NEXT_MIT

    INTO :P65_MIT_DUE

    FROM UIC_WELL_MIT_DUE

   WHERE INVENTORY_ID = :P65_INVENTNO;

EXCEPTION

  WHEN NO_DATA_FOUND THEN

  :P65_MIT_DUE := '';

END;

Full Advisor Error:

Attribute    Item Default (When the item has no source or session state, use this default value)

Check    Is Valid SQL or PL/SQL Code

Category    Error

Message  

Compilation error - ORA-06550: line 5, column 8:

PLS-00103: Encountered the symbol "BEGIN" 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 s

Lawrence Koss

This post has been answered by fac586 on Mar 28 2019
Jump to Answer
Comments
Post Details
Added on Mar 27 2019
2 comments
377 views