1 Reply Latest reply: Aug 8, 2013 11:56 AM by Vadim Tropashko-Oracle RSS

    R4 EA - Run procedure - VARCHAR2 Input parameter default problem

    Vin Steele

      The  "Run" function (from either the right-click menu or the green icon in the top of the code editor) for standalone procedures has been enhanced to be aware of and use default values. Thank you.

      When using default VARCHAR2 values, it encloses the values in double single quotes which results in an error.


      Here is the generated PL/SQL Block for a procedure:

      DECLARE

        PI_COMP_NAME VARCHAR2(200);

        PI_START_DATE DATE;

        PI_END_DATE DATE;

        PI_RUN_EXTRACT BOOLEAN;

        PI_RUN_LOAD BOOLEAN;

        PI_TRUNCATE_TABLE BOOLEAN;

        PI_BATCH_SIZE NUMBER;

        PI_PARALLEL_LEVEL NUMBER;

      BEGIN

        PI_COMP_NAME := ''HPCCM'';

        PI_START_DATE := NULL;

        PI_END_DATE := NULL;

        PI_RUN_EXTRACT := TRUE;

        PI_RUN_LOAD := TRUE;

        PI_TRUNCATE_TABLE := FALSE;

        PI_BATCH_SIZE := 500000;

        PI_PARALLEL_LEVEL := 2;

       

       

        ADHOC_LOAD_USER_RFC_BRIDGE(

          PI_COMP_NAME => PI_COMP_NAME,

          PI_START_DATE => PI_START_DATE,

          PI_END_DATE => PI_END_DATE,

          PI_RUN_EXTRACT => PI_RUN_EXTRACT,

          PI_RUN_LOAD => PI_RUN_LOAD,

          PI_TRUNCATE_TABLE => PI_TRUNCATE_TABLE,

          PI_BATCH_SIZE => PI_BATCH_SIZE,

          PI_PARALLEL_LEVEL => PI_PARALLEL_LEVEL

        );

      --rollback;

      END;


      Attempting to run this code resulted in the following error:

      ora-06550: line 11, column 21:

      PLS-00103: Encountered the symbol ''HPCCM'' when expecting one of the following: *&=-+;,/. at in is mod remainder...

       

       

      replacing the duplicated single quotes with single quotes enabled the code to run successfully.