ADR 3.0.1 install ORDS_PUBLIC_USER of error: ORA-06550, PLS-00103

Try the Advanced installation of new ADR in a clean PDB 12 c (12.1.0.1) installation.

If someone had the same problem and a work around?

Error at startup to the line: 48 in command.

Start

run immediately "create user ORDS_PUBLIC_USER identified by ' ^ PUB_PWD ' account unlock default tablespace ^ temporary tablespace PUB_DATATBS ^ PUB_TEMPTBS';"

end;

Error report-

ORA-06550: Line 2, column 23:

PLS-00103: Fand das symbol "create user ORDS_PUBLIC_USER identified by 'mySecretPwd' als eines der following works wurde:

(- + new case mod not null < an ID >)

< between double quote delimited identifiers of > < a variable binding >

continue the current avg County are min max sql stddev prior

variance of the sum run forall fusion timestamp interval

Date < a literal string with the specified set of characters >

< a > < a SQL string between single quotes > hose

< ein alternativ in Anfuhrungszeichen geset

force_print

It seems to be related to the change here:

https://community.Oracle.com/thread/3731913

Finally the installation of ADR is running. However still not showing apex, but which appear to be a different problem.

Here is my solution to overcome the problem of creation of ORDS_PUBLIC_USER.

The problem was that they changed it to use execute_immediate. However, lexical surrogates have ' included.

Gives problems when adding to the string of immediate execution. And also problems for the password in quotation marks.

In the ords.war file to find the ords_create_rest_users.sql and replace the relevant parts marked with blue lines.

...

set PUB_PWD = ^ 1

set PUB_DATATBS = ' ^ 2'

set PUB_TEMPTBS = ' ^ 3'

ALTER session set current_schema = SYS;

-Remove user REST if exists

...

-Create user ORDS_PUBLIC_USER and unlock the account

create user ORDS_PUBLIC_USER identified by ' ^ PUB_PWD ' account unlock default tablespace ^ temporary tablespace PUB_DATATBS ^ PUB_TEMPTBS;

...

Tags: Database

Similar Questions

  • Creation function Interior package Error (15,3): PLS-00103: encountered the symbol ";" when expecting one of the following values: back

    Hello

    I am trying to create a function inside the packaging.

    In the Package BODY I've defined the function, but in the definition of the package, it gives me syntax errors.

    • Error (15,3): PLS-00103: encountered the symbol ";" when expecting one of the following values: back
    • Error (39.1): PLS-00103: encountered the symbol "END" when waiting for one of the following values: start the function pragma procedure subtype type current cursor removal exist prior

    What can I do wrong here.

    Thank you

    Ken

    Inner package BODY:

    / * FUNCTION to form the query * /.

    FUNCTION UDF_FORMQUERY)

    IN_CASEID VARCHAR2,

    IN_SRCLYR VARCHAR2,

    IN_SRC_CONDN VARCHAR2

    )

    RETURN VARCHAR2

    AS

    varSQLQuery VARCHAR2 (10000);

    BEGIN

    varSQLQuery: = "test query";

    RETURN varSQLQuery;

    DBMS_OUTPUT. Put_line (varSQLQuery);

    END UDF_FORMQUERY;

    Definition of package inside:

    create or replace PACKAGE BODY MY_SQUERY

    AS

    FUNCTION UDF_FORMQUERY)

    IN_CASEID VARCHAR2,

    IN_SRCLYR VARCHAR2,

    VARCHAR2 IN_SRC_CONDN( )

    RETURN VARCHAR2

    AS varSQLQuery VARCHAR2 (10000);

    END MY_SQUERY;

    your package definition is incorrect, you have included the part of the declaration of the variables of the function in the package definition. It should be like

    FUNCTION UDF_FORMQUERY)

    IN_CASEID VARCHAR2,

    IN_SRCLYR VARCHAR2,

    IN_SRC_CONDN VARCHAR2)

    RETURN VARCHAR2;

  • Error (34.2): PLS-00103: encountered the symbol "END" when you try to compile the procedure.

    Hello

    I get the following error when I try to compile the procedure. I call a package inside this simple procedure. Not sure where I do worng. Here is the error I get.

    Error (34.2): PLS-00103: encountered the symbol "END"?

    Here is my code

    create or replace PROCEDURE BATCH_JOB_CAC_SP

    (

    vstatus OUT NUMBER)

    AS

    vloadserver global_name.global_name%TYPE: = get_dbservername;

    vuseridmod CONSTANT VARCHAR2 (15): = 'SYSTEM '.

    vloadname CONSTANT VARCHAR2 (30): = "BATCH_JOB_CAC_SP";

    v_cnt_upd NUMBER: = 0;

    vrunid NUMBER;

    v_spoutput VARCHAR2 (150);

    CURSOR job_cac

    IS

    SELECT NumCli, job_cac FROM batch_job_cac, batch_recid, jobnum;

    BEGIN

    I'm in job_cac LOOP

    job_cac_pkg.job_cac_valid_sp (i.custnum, i.jobnum, v_spoutput);

    CASE v_spoutput

    WHEN "1" THEN DBMS_OUTPUT. Put_line ('update job ACC');

    WHEN "2" THEN DBMS_OUTPUT. Put_line ('update job ACC');

    WHEN '3' THEN DBMS_OUTPUT. Put_line ('can not update working ACC');

    OF ANOTHER DBMS_OUTPUT. Put_line (v_spoutput);

    END CASE;

    END LOOP;

    EXCEPTION

    WHILE OTHERS THEN

    IF job_cac % isopen THEN

    CLOSE Job_cac;

    END IF;

    ROLLBACK;

    vStatus: = 1;

    LOG_ERROR_SP_NM (vLoadServer, vLoadName, SQLCODE, SQLERRM, vUserIdMod);

    END;

    END BATCH_JOB_CAC_SP;

    Thanks for your help.

    Hello

    You have 2 statements END at the bottom of your code, but only 1 BEGIN statement earlier.

    Losing one of these END States.

  • ORA-06550-PLS-00302 error on execution mapping

    I have a mapping in OWB 11.2.0.3, I can bend and validate.
    But if I like him to run it it fails with the following error:
    ORA-06550: line 1, column 1487: PLS-00302: component 'MAPPING_NAME' must be declared ORA-06550: line 1, column 1470: PL/SQL: statement ignored

    I've already found a post that said: grant run owner_name. "' name map ' to user_name;
    In my case it does solve the problem.

    Someone at - it an idea of what the problem might be?


    Thanks for any help,

    Benjamin

    We have the same problem on OWB 11.2.0.3 and resolved to rename a schema name, because it was the same thing to another database object. If this is your case, you can change the name of the database schema and the location on OWB.
    We hope this help you.

    To view the possible duplicate objects (drawing object):

    SELECT *.
    FROM DBA_OBJECTS
    WHERE OBJECT_NAME = '';

    On the Oracle document is much better explained:

    [http://docs.oracle.com/cd/E11882_01/relnotes.112/e24470/toc.htm]

    Oracle® Warehouse Builder Release Notes
    * 11g Release 2 (11.2) part number E24470-05 *.

    [...]

    7.14 existence of an object in the schema with the same name as the schema target in the database
    12776878: If an object exists in the schema with the same name as the schema target in the database, an error is displayed.

    For example:

    Named A schema has an object called q. schema named Q exists and has an object called Z.
    When you call from SchemaQ.ObjectZ to a scheme A, it looks in schema A Q.Z. Z is not found and displays the following error:

    ORA-06550:... : PLS-00302: component 'XYZ' must be declared
    Workaround: rename one of the objects Q to R or one letter other than Q.

    [...]

  • Error (8.3): PLS-00103: encountered the symbol "END".

    Migration to CREATE or REPLACE PACKAGE
    IS
    PROCEDURE load_staging_tables;
    Migration of the END;
    /

    Migration to CREATE or REPLACE PACKAGE BODY
    IS
    PROCEDURE load_staging_tables
    IS
    Date of LAST_CREATE_DATE;
    BEGIN
    LAST_CREATE_DATE: = max (migrate_load_dt) select mgur;
    END load_staging_tables;

    Migration of the END;
    /

    The following error is received:
    Error (8.3): PLS-00103: encountered the symbol "END".

    running in 11 g using sql developer.


    Which is wrong with the script?

    You cannot assign your select statement directly to a variable. You can use an INTO clause in your select statement.

    CREATE OR REPLACE PACKAGE BODY migration IS
      PROCEDURE load_staging_tables IS
        LAST_CREATE_DATE date;
      BEGIN
        --LAST_CREATE_DATE := select max(migrate_load_dt) from mgur;
        select max(migrate_load_dt)
          into LAST_CREATE_DATE
          from mgur;
      END load_staging_tables;
    END migration;
    
  • As I corrected the error?  ORA-06550-PLS-00357

    * {color: #0000ff} good morning *.

    * I'm trying to generate a file extension. txt,
    extracting information from a table named test, and I generated the
    Suite error ORA-06550: - and - PLS-00357: {color} *.


    CREATE TABLE ENSAYO
    (
    NUMBER OF CODE,
    DATE DATE default sysdate,
    NUMBER VARCHAR2 (40)
    )
    ;



    Insert of ensayo values(1,'12-12-2009','rey');
    Insert of ensayo values(2,'10-02-2009','luna');
    Insert of ensayo values(3,'16-03-2009','paola');
    Insert of ensayo values(4,'16-03-2009','Natalia');



    Set serverout
    DECLARE
    utl_file.file_type v1.
    v2 varchar2 (100);
    Start
    v1: = utl_file.fopen ('PUBLIC_ACCESS', 'prueb': to_char (sysdate, 'yyyymmdd') |'. txt', 'w');

    loop

    UTL_FILE.put_line (v1, Ensayo.Codigo);

    end loop;
    UTL_FILE.fclose (v1);
    exception
    while others then
    dbms_output.put_line (SQLERRM);
    end;
    /
    * {color: #ff0000} *.
    UTL_FILE.put_line (v1, Ensayo.Codigo);
    ***
    * {color} {color: #ff0000} ERROR en l & Yacute; NEA 7: *.
    ORA-06550: l & Yacute; NEA 7, column 32: *.
    PLS-00357: the referencia has the tabla, vista o sequence "ENSAYO. CÓDIGO ' no EST & szlig;. *
    permitida en este contexto
    ORA-06550: l & Yacute; NEA 7, column 4:
    * PL/SQL: statement ignored {color} *.





    * {color: #0000ff} that I correct the error? *

    * Thank you for your cooperation... *.
    * good day... *.
    * {color} *.


    * {color: #0000ff} *.
    * {color} *.


    * {color: #0000ff} Reynel Martinez Salazar. {color} *.

    You must use FOR cursor LOOP:

    DECLARE
    v1 utl_file.file_type;
    v2 varchar2 (100);
    begin
    v1:= utl_file.fopen('PUBLIC_ACCESS','prueb'||to_char(sysdate,'yyyymmdd')||'.txt','w');
    for rec in (select codigo from ensayo) loop
    utl_file.put_line(v1,rec.codigo);
    end loop;
    utl_file.fclose(v1);
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    end;
    /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.

  • Execution of procedure error: ORA-06550 and PLS-00103

    Hi, I created the stored procedure as,

    CREATE OR REPLACE PACKAGE BODY APPS.TMP_IMPORT_ITEMS_PKG AS
    
    
      PROCEDURE LOAD_INTERFACE_TABLE(organization_code IN VARCHAR2, errbuf OUT VARCHAR2, retcode OUT NUMBER) IS
    
    
      org_code varchar2(3);
    
    
      BEGIN
    
    
        org_code:= organization_code;
    
    
        DBMS_OUTPUT.PUT_LINE('Organization Code is...' || org_code);
    
    
      END LOAD_TABLE;
    
    
    END TMP_IMPORT_ITEMS_PKG;
    And here is the code I am trying to run:
    DECLARE
    
    
      V_ERRBUF VARCHAR2(1000);
    
    
      V_RETCODE NUMBER;
    
    
    BEGIN
    
    
      EXEC TMP_IMPORT_ITEMS_PKG.LOAD_INTERFACE_TABLE('x1', V_ERRBUF, V_RETCODE);
    
    
    END;
    When I run the above code, I get the following error:


    ORA-06550: line 5, column 10:
    PLS-00103: encountered the symbol "TMP_IMPORT_ITEMS_PKG" during the expected in the following way:


    := . ( @ % ;
    The symbol ': = ' was replaced by 'TMP_IMPORT_ITEMS_PKG' continue.

    Can any body tell me what is the problem with the above code
    Thanks in advance,
    Kumar K

    Published by: user2054206 on December 17, 2008 21:09

    Published by: user2054206 on December 17, 2008 21:27

    Hello

    In PL/SQL, you cannot call the procedure like exec... in sql, you can call exec but in PL/SQL, you can call as follows.

    DECLARE
    V_ERRBUF VARCHAR2 (1000);
    NUMBER OF V_RETCODE;
    BEGIN
    TMP_IMPORT_ITEMS_PKG. LOAD_INTERFACE_TABLE ('x 1', V_ERRBUF, V_RETCODE);
    END;

    I hope this works.

  • Error: * ORA-06550:

    Hello

    I create a Sql report and using this CODE


    with bills like)
    SELECT p.PARTY_NAME, p.MOB1_NO, sum (nvl(b.TOTAL_AMOUNT,0)) bill_amount
    PARTY_DETAILS p, BILL_DETAILS b
    where p.PARTY_NAME = b.PARTY_NAME (+)
    P.PARTY_NAME group, p.MOB1_NO
    ),
    payments)
    Select p.PARTY_NAME, sum (nvl (pd. TOTAL_AMOUNT, 0)) paid_amount
    PARTY_DETAILS p, pd of the PARTY_PAYMENT_DETAILS
    where p.PARTY_NAME = DB. PARTY_NAME (+)
    P.PARTY_NAME group
    )
    Select b.party_name, b.mob1_no, BILL_AMOUNT, PAID_AMOUNT, balance_amount BILL_AMOUNT-PAID_AMOUNT
    invoices, payments p b
    where b.PARTY_NAME = p.PARTY_NAME


    This code, the Code is Correct, I ran this code into the SQL command.

    But when I apply it to a region of the Page SQL Report then it shows me error

    1 error has occurred

    * ORA-06550: line 18, column 2: PL/SQL: ORA-00933: command not properly ended SQL ORA-06550: line 3, column 1: PL/SQL: SQL statement ignored ORA-06550: line 19, column 21: PLS-00103: encountered the symbol "end-of-file" when awaits one of the following numbers: (begin case declare exit end exception for goto rise back loop mod null pragma select update while with)


    How can I remove this error.
  • Get the error ora-06550: line 1, column 28 met the symbol «;»

    The code is:

    create or replace procedure while (empid number, varchar2 lname) is
    Meter number;
    fact number;
    Start
    Select max (department_id) in terms of employees where employee_id = empid;
    All counter < = loop 3
    insert into employees (department_id, last_name, employee_id) values ((did+counter), empid, lname);
    counter: = counter + 1;
    end loop;
    end;
    /

    I think I got it. You named the procedure WHILE. And althouh everything IN is not a reserved word, but a key word, I'd stay away from that name. What is your version complete:

    Select * from version of v$.

    SY.

  • Error: PLS-00103: encountered the symbol 'COLLECT' during the waited in the following way:. (, limiting the symbol)

    Hi all

    I get this error:

    • Error (55,45): PLS-00103: encountered the symbol 'COLLECT' during the waited in the following way:. (, limiting the symbol ".") has been inserted before 'COLLECT' to continue.

    While trying to create this procedure as below:

    If I run the query, I get the result, but in the procedure, I am trying to convert the OUT_REFCURSOR in a table, but this error.

    PROCEDURE SP_GETVALIDATE)

    IN_CASEID IN VARCHAR2,

    IN_REQID IN VARCHAR2,

    OUT_REFCURSOR ON SYS_REFCURSOR)

    AS

    IS OF TYPE RECORDTYPE

    RECORD (COL1, COL2 VARCHAR2 VARCHAR2);

    IS OF TYPE TABLETYPE

    THE REFTABLETYPE TABLE

    INDEX BY PLS_INTEGER;

    BEGIN

    OPEN for SELECT OUT_REFCURSOR c.RCRD_NO, c.STE_NO_TX DE T_LYR_STES c, p of LAND WHERE c.case_id = IN_CASEID AND p.L_NUMBER > 100;

    LOOP

    Look FOR the OUT_REFCURSOR BULK COLLECT outtable;

    WHEN the outtable OUTPUT. COUNT = 0;

    FOR indx IN 1... outtable. COUNTY

    LOOP

    dbms_output.put_line (outtable (indx). ) RCRD_NO);

    END LOOP;

    END LOOP;

    CLOSE OUT_REFCURSOR;

    END SP_GETVALIDATE;

    I could be wrong here.

    any help appreciated.

    Thank you

    Ken

    SEARCH OUT_REFCURSOR BULK COLLECT INTO outtable;

    You've had your BULK COLLECT and the wrong way around

  • PLS-00103: received the error on the create procedure

    Dear all,

    I created the view during this procedure, I got error.

    1 PLS-00103: encountered the symbol "=" when expecting one of the following conditions:

    constant exception < an ID >
    < a between double quote delimited identifiers > double Ref table Fedya
    timestam tank time


    2 PLS-00103: encountered the symbol "SELECT" at the expected in the following way:

    (- + new case mod not null other < an ID >)
    < between double quote delimited identifiers of > < a variable binding > avg


    3 PLS-00103: encountered the symbol ")" when expecting one of the following values:

    . (* @ % & -+; / TA for rem rest mod)
    < an exhibitor > (*) and or group having less cross order
    Start uni



    create or replace PROCEDURE PO_ITEM_BRANCH_PROC (ITEM_ID1 in NUMBER, BRANCH_CODE1 IN VARCHAR2, RESULT1 ON NUMBER, ERR_MSG OUT NVARCHAR2)
    as

    PERFORMANCE(1): = 0;

    BEGIN


    SELECT

    Count (a.asset_number) in RESULT1

    Of

    FA_ADDITIONS HAS
    C FA_CATEGORIES_VL
    , FA_BOOKS B
    FA_LOCATIONS FL
    FA_DISTRIBUTION_HISTORY DH
    FA_TRANSACTION_HEADERS TH

    WHERE

    A.ASSET_CATEGORY_ID = C.CATEGORY_ID
    AND A.ASSET_ID = B.ASSET_ID
    AND A.ASSET_ID = TH. ASSET_ID
    AND TH. TRANSACTION_TYPE_CODE = "ADD."
    AND B.TRANSACTION_HEADER_ID_IN = TH. TRANSACTION_HEADER_ID
    AND B.ASSET_ID = TH. ASSET_ID
    AND A.ASSET_ID = DH. ASSET_ID
    AND DH. LOCATION_ID = FL. LOCATION_ID
    AND TH. TRANSACTION_TYPE_CODE = "ADD."
    - AND IN FLORIDA. SEGMENT4 = 'Shalimar Campus, Lahore.
    AND TH. TRANSACTION_TYPE_CODE <>"FULL PENSION".
    - AND IN FLORIDA. SEGMENT4 = (SELECT flex_value FROM fnd_flex_values WHERE attribut1 = '04010303')
    AND A.ASSET_CATEGORY_ID IN)
    SELECT
    MSI.asset_category_id
    Of
    b po_requisition_lines_all,
    MSI mtl_system_items_b
    WHERE

    b.ITEM_ID = msi. INVENTORY_ITEM_ID
    AND msi.inventory_item_id (+) = B.item_id
    AND msi.organization_id (+) = B.destination_organization_id
    AND ITEM_ID = b.item_id

    )
    AND IN FLORIDA. SEGMENT4 =)

    SELECT

    (SELECT FLEX_VALUE FROM fnd_flex_values WHERE attribut1 = B.ATTRIBUTE2) GENERAL MANAGEMENT OF THE

    Of
    b po_requisition_lines_all,
    MSI mtl_system_items_b

    WHERE

    b.ITEM_ID = msi. INVENTORY_ITEM_ID
    AND msi.inventory_item_id (+) = B.item_id
    AND msi.organization_id (+) = B.destination_organization_id
    AND b.ATTRIBUTE2 = BRANCH_CODE

    )

    ;

    exception when others then
    Mesg: = 'select failed in BILLTER.
    err_msg: = mesg;
    END;
    create or replace PROCEDURE PO_ITEM_BRANCH_PROC(ITEM_ID1 IN NUMBER,
                                                    BRANCH_CODE1 IN VARCHAR2,
                                                    RESULT1 OUT NUMBER,
                                                    ERR_MSG OUT NVARCHAR2
                                                   ) as
    BEGIN
    
      RESULT1 := 0 ; 
    
      SELECT count(a.asset_number)
        into RESULT1
        FROM FA_ADDITIONS A,
             FA_CATEGORIES_VL C,
             FA_BOOKS B,
             FA_LOCATIONS FL,
             FA_DISTRIBUTION_HISTORY DH,
             FA_TRANSACTION_HEADERS TH
       WHERE A.ASSET_CATEGORY_ID = C.CATEGORY_ID
         AND A.ASSET_ID = B.ASSET_ID
         AND A.ASSET_ID = TH.ASSET_ID
         AND TH.TRANSACTION_TYPE_CODE = 'ADDITION'
         AND B.TRANSACTION_HEADER_ID_IN = TH.TRANSACTION_HEADER_ID
         AND B.ASSET_ID = TH.ASSET_ID
         AND A.ASSET_ID = DH.ASSET_ID
         AND DH.LOCATION_ID = FL.LOCATION_ID
         AND TH.TRANSACTION_TYPE_CODE = 'ADDITION'
    --   AND FL.SEGMENT4 = 'Shalimar Campus Lahore'
         AND TH.TRANSACTION_TYPE_CODE != 'FULL RETIREMENT'
    --   AND FL.SEGMENT4 = (SELECT flex_value FROM fnd_flex_values WHERE ATTRIBUTE1 = '04010303')
         AND A.ASSET_CATEGORY_ID IN (SELECT msi.asset_category_id
                                       FROM po_requisition_lines_all b,
                                            mtl_system_items_b msi
                                      WHERE b.ITEM_ID = msi.INVENTORY_ITEM_ID
                                        AND msi.inventory_item_id(+) = B.item_id
                                        AND msi.organization_id(+) = B.destination_organization_id
                                        AND b.item_id = ITEM_ID
                                    )
         AND FL.SEGMENT4 = (SELECT (SELECT FLEX_VALUE
                                      FROM fnd_flex_values
                                     WHERE ATTRIBUTE1 = B.ATTRIBUTE2
                                   ) BRANCH
                              FROM po_requisition_lines_all b,
                                   mtl_system_items_b msi
                             WHERE b.ITEM_ID = msi.INVENTORY_ITEM_ID
                               AND msi.inventory_item_id(+) = B.item_id
                               AND msi.organization_id(+) = B.destination_organization_id
                               AND b.ATTRIBUTE2 = BRANCH_CODE
                           );
    exception
      when others
      then err_msg := 'select failed in BILLTER';
    END ;
    

    Concerning

    Etbin

    Edited by: Etbin on 21.4.2012 11:26
    Sorry

    Edited by: Etbin on 21.4.2012 12:02
    reposted

  • PLS-00103: error, produces the symbol

    Hi all, I am using a slider from my package spec, but when I do this, I get the error in a particular cursor below

    Spec
    CURSOR x_sysdate_rec IS
    SELECT sysdate
        --to_char(sysdate,'DD-MON-YYYY') "Date"
    FROM dual;
    x_sysdate      x_sysdate_rec%ROWTYPE;   
    Body
    44  PROCEDURE format_inv_rec IS
    45         x_report_start_date   := x_sysdate.sysdate;
    46        -- x_report_end_date   := x_sysdate.sysdate;
    47        --x_inv_date          := x_sysdate.sysdate;
    
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    45/32    PLS-00103: Encountered the symbol "=" when expecting one of the
             following:
             constant exception <an identifier>
             <a double-quoted delimited-identifier> table long double ref
             char time timestamp interval date binary national character
             nchar
             The symbol "<an identifier>" was substituted for "=" to continue.
    Can someone guide me where I am doing wrong.

    Thanks in advance!

    I think you missed to mention the data type for variables.

    PROCEDURE format_inv_rec IS
    x_report_start_date  date := x_sysdate.sysdate;
    -- x_report_end_date date := x_sysdate.sysdate;
    --x_inv_date         date := x_sysdate.sysdate;
    

    In addition, as hoek said, are why complicate things?

  • Error PLS-00103

    can you please tell me what I'm missing. I am getting error below.
    Error(8,12): PLS-00103: Encountered the symbol "C_SEL" when expecting one of the following:     := . ( @ % ; 
    CREATE OR REPLACE PACKAGE BODY "XXDL_PN_LOAD_EMP_ASSIGN_PKG"
    AS
    FUNCTION insert_pn_emp_space_assign
        RETURN NUMBER
    IS
    BEGIN
        CURSOR c_sel  IS --NO RECORDS FOUND
          SELECT room_id ,
            room_scheduler,
            benches,
            lab_type,
            room_num,
            floor_id ,
            DEPARTMENT_NAME ,
            room_eff_from_date ,
            room_eff_to_date ,
            org_id ,
            pi_id ,
            dept_pct ,
            pi_pct ,
            FUNCTIONAL_USE_PCT ,
            RESEARCH_EXPLANATION ,
            SUB_DEPT ,
            FUNCTIONAL_USE_CODE ,
            FUNCTIONAL_USE_DESCRIPTION ,
            COUNT(1)
          FROM XXDL.XXDL_CD_FACILITY k
          WHERE pi_id NOT LIKE 'FMS%'
            --and floor_id ='00'
            --and pi_id='04309605'
          AND room_eff_to_date IS NULL
            -- and room_id ='07-590-02-2134'
          AND room_id NOT IN
            (SELECT location_code
            FROM PN_SPACE_ASSIGN_EMP_V
            WHERE emp_space_assign_id IS NOT NULL
            )
        AND EXISTS
          ( SELECT DISTINCT location_code
          FROM pn_locations_all
          WHERE room_id=location_code
            --and nvl(to_date(room_eff_to_date,'Mon/dd/RRRR'),active_end_date)=active_end_date
          )
        GROUP BY room_id ,
          DEPARTMENT_NAME ,
          room_scheduler,
          benches,
          lab_type,
          room_num,
          floor_id ,
          room_eff_from_date ,
          room_eff_to_date ,
          org_id ,
          pi_id ,
          dept_pct ,
          pi_pct ,
          FUNCTIONAL_USE_PCT ,
          RESEARCH_EXPLANATION ,
          SUB_DEPT ,
          FUNCTIONAL_USE_CODE ,
          FUNCTIONAL_USE_DESCRIPTION
        HAVING COUNT(1)=1 ;
        CURSOR c_conc( p_room_id VARCHAR2 ,p_dept_name VARCHAR2 ,p_piid VARCHAR2 ,p_eff_date VARCHAR2 )
        IS
          SELECT FUNCTIONAL_USE_PCT ATTRIBUTE5 ,
            RESEARCH_EXPLANATION ATTRIBUTE6 ,
            SUB_DEPT ATTRIBUTE7 ,
            dept_pct ATTRIBUTE1 ,
            pi_pct ATTRIBUTE2 ,
            FUNCTIONAL_USE_CODE ATTRIBUTE3 ,
            FUNCTIONAL_USE_DESCRIPTION ATTRIBUTE4
          FROM XXDL.XXDL_CD_FACILITY
          WHERE room_id         =p_room_id
          AND department_name   =p_dept_name
          AND pi_id             =p_piid
          AND 1                 =2------not used
          AND room_eff_to_date IS NULL
            --and to_date(room_eff_to_date,'Mon/dd/RRRR')=to_date(p_eff_date,'Mon/dd/RRRR')
            ;
        
        l_person_id     NUMBER;
        l_location_id   NUMBER;
        l_parent_loc_id NUMBER;
        l_attribute5    VARCHAR2(500);
        l_attribute6    VARCHAR2(500);
        l_attribute7    VARCHAR2(500);
        l_attribute1    VARCHAR2(500);
        l_attribute2    VARCHAR2(500);
        l_attribute3    VARCHAR2(500);
        l_attribute4    VARCHAR2(500);
      BEGIN
           mo_global.set_policy_context('S',84);
        FOR c2 IN c_sel
        LOOP
          l_parent_loc_id:= NULL;
          BEGIN
            SELECT location_id
            INTO l_parent_loc_id -- NO RECORDS RETURNED FROM CURSOR
            FROM pn_locations_all
            WHERE location_alias          = c2.floor_id
            AND location_type_lookup_code ='FLOOR';
          EXCEPTION
          WHEN OTHERS THEN
            l_parent_loc_id:= NULL;
          END;
          l_location_id:= NULL;
          BEGIN
            SELECT location_id
            INTO l_location_id
            FROM pn_locations_all
            WHERE location_code    = c2.room_id
            AND parent_location_id =l_parent_loc_id;
          EXCEPTION
          WHEN OTHERS THEN
            l_location_id:= NULL;
          END;
          l_attribute3:=NULL;
          l_attribute4:=NULL;
          l_attribute5:=NULL;
          l_attribute6:=NULL;
          l_attribute7:=NULL;
          FOR c3      IN c_conc(c2.room_id,c2.department_name,c2.pi_id,c2.room_eff_to_date)
          LOOP
            --
            IF l_attribute5 IS NULL THEN
              l_attribute5  :=c3.attribute3||'.'||c3.attribute5;
            ELSE
              IF c3.attribute5 IS NOT NULL THEN
                l_attribute5   :=l_attribute5||','||c3.attribute3||'.'||c3.attribute5;
              END IF;
            END IF;
            --
            IF l_attribute6    IS NULL THEN
              IF c3.attribute6 IS NOT NULL THEN
                l_attribute6   :=c3.attribute3||'.'||c3.attribute6;
              END IF;
            ELSE
              IF c3.attribute6 IS NOT NULL THEN
                l_attribute6   :=l_attribute6||','||c3.attribute3||'.'||c3.attribute6;
              END IF;
            END IF;
            IF l_attribute7    IS NULL THEN
              IF c3.attribute7 IS NOT NULL THEN
                l_attribute7   :=c3.attribute3||'.'||c3.attribute7;
              END IF;
            ELSE
              IF c3.attribute7 IS NOT NULL THEN
                l_attribute7   :=l_attribute7||','||c3.attribute3||'.'||c3.attribute7;
              END IF;
            END IF;
            --functional code
            IF l_attribute3 IS NULL THEN
              l_attribute3  :=c3.attribute3;
            ELSE
              IF c3.attribute3 IS NOT NULL THEN
                l_attribute3   :=l_attribute3||','||c3.attribute3;
              END IF;
            END IF;
            --functional desc
            IF l_attribute4 IS NULL THEN
              l_attribute4  :=c3.attribute4;
            ELSE
              IF c3.attribute4 IS NOT NULL THEN
                l_attribute4   :=l_attribute4||','||c3.attribute4;
              END IF;
            END IF;
          END LOOP;
          l_person_id:=NULL;
          BEGIN
            SELECT person_id
            INTO l_person_id
            FROM per_all_people_f
            WHERE employee_number=c2.pi_id
            AND sysdate BETWEEN effective_start_date AND effective_end_date ;
          EXCEPTION
          WHEN OTHERS THEN
            l_person_id:=NULL;
          END;
        insert into PN_EMP_SPACE_ASSIGN_ITF
                                          (
                                          BATCH_NAME                                 
                                          ,ENTRY_TYPE                                 
                                          ,EMP_SPACE_ASSIGN_ID                                
                                          ,LOCATION_ID                                        
                                          ,EMPLOYEE_ID                                        
                                          ,COST_CENTER_CODE                                   
                                          ,ALLOCATED_AREA                                     
                                          ,LAST_UPDATE_DATE                           
                                          ,LAST_UPDATE_LOGIN                                  
                                          ,CREATED_BY                                 
                                          ,CREATION_DATE                              
                                          ,LAST_UPDATED_BY                            
                                          ,ATTRIBUTE_CATEGORY                                 
                                          ,ATTRIBUTE1                                         
                                          ,ATTRIBUTE2                                         
                                          ,ATTRIBUTE3                                         
                                          ,ATTRIBUTE4                                         
                                          ,ATTRIBUTE5                                         
                                          ,ATTRIBUTE6                                         
                                          ,ATTRIBUTE7                                         
                                          ,ATTRIBUTE8                                         
                                          ,ATTRIBUTE9                                         
                                          ,ATTRIBUTE10                                        
                                          ,ATTRIBUTE11                                        
                                          ,ATTRIBUTE12                                        
                                          ,ATTRIBUTE13                                        
                                          ,ATTRIBUTE14                                        
                                          ,ATTRIBUTE15                                        
                                          ,TRANSFERRED_TO_CAD                                 
                                          ,TRANSFERRED_TO_PN                                  
                                          ,ERROR_MESSAGE                                      
                                          ,SOURCE                                             
                                          ,REQUEST_ID                                         
                                          ,PROGRAM_APPLICATION_ID                             
                                          ,PROGRAM_ID                                         
                                          ,PROGRAM_UPDATE_DATE                                
                                          ,EMP_ASSIGN_START_DATE                              
                                          ,EMP_ASSIGN_END_DATE                                
                                          ,UTILIZED_AREA                                      
                                          ,CHANGE_DATE                                        
                                          ,CHANGE_MODE                                        
                                          ,PROJECT_ID                                         
                                          ,TASK_ID                                            
                                          ) 
                                  values--custom table columns
                                          (     
                                          '07-590_floor_bulk_spc' --BATCH_NAME                                 
                                          ,'A' --ENTRY_TYPE                                 
                                          ,PN_SPACE_ASSIGN_EMP_S.nextval --EMP_SPACE_ASSIGN_ID                                
                                          ,l_location_id --LOCATION_ID                                        
                                          ,l_person_id --EMPLOYEE_ID                                        
                                          ,1028389 --COST_CENTER_CODE                                   
                                          ,0 --ALLOCATED_AREA                                     
                                          ,sysdate --LAST_UPDATE_DATE                           
                                          ,157092 --LAST_UPDATE_LOGIN                                  
                                          ,157092 --CREATED_BY                                 
                                          ,sysdate --CREATION_DATE                              
                                          ,157092 --LAST_UPDATED_BY                            
                                          ,null --ATTRIBUTE_CATEGORY                                 
                                          ,c2.dept_pct --ATTRIBUTE1                                         
                                          ,c2.pi_pct --ATTRIBUTE2                                         
                                          ,C2.FUNCTIONAL_USE_CODE --ATTRIBUTE3                                         
                                          ,C2.FUNCTIONAL_USE_DESCRIPTION  --ATTRIBUTE4                                         
                                          ,C2.FUNCTIONAL_USE_PCT  --ATTRIBUTE5                                         
                                          ,C2.RESEARCH_EXPLANATION --ATTRIBUTE6                                         
                                          ,C2.SUB_DEPT --ATTRIBUTE7                                         
                                          ,null --ATTRIBUTE8                                         
                                          ,null --ATTRIBUTE9                                         
                                          ,null --ATTRIBUTE10                                        
                                          ,c2.ORG_Id||'-'||c2.DEPARTMENT_NAME --ATTRIBUTE11                                        
                                          ,null --ATTRIBUTE12                                        
                                          ,null --ATTRIBUTE13                                        
                                          ,null --ATTRIBUTE14                                        
                                          ,null --ATTRIBUTE15                                        
                                          ,null --TRANSFERRED_TO_CAD                                 
                                          ,null --TRANSFERRED_TO_PN                                  
                                          ,null --ERROR_MESSAGE                                      
                                          ,'TST' --SOURCE                                             
                                          ,null --REQUEST_ID                                         
                                          ,null --PROGRAM_APPLICATION_ID                             
                                          ,null --PROGRAM_ID                                         
                                          ,null --PROGRAM_UPDATE_DATE                                
                                          ,to_date(c2.room_eff_from_date,'mon/dd/RRRR') --EMP_ASSIGN_START_DATE                              
                                          ,to_date(c2.room_eff_to_date,'mon/dd/RRRR')  --EMP_ASSIGN_END_DATE                                
                                          ,null --UTILIZED_AREA                                      
                                          ,null --CHANGE_DATE                                        
                                          ,null --CHANGE_MODE                                        
                                          ,null --PROJECT_ID                                         
                                          ,null --TASK_ID   --07-590-02-ELEV02
                                          );
    
        END LOOP;
      RETURN 1;
    EXCEPTION
           WHEN OTHERS THEN
               FND_FILE.PUT_LINE(FND_FILE.LOG,'Error while insert_pn_emp_space_assign - '||sqlerrm);
                  RETURN 0;
            END;
          WHEN OTHERS THEN
            FND_FILE.PUT_LINE(FND_FILE.LOG,'Error while insert_pn_emp_space_assign - '||sqlerrm);
            RETURN 0;
      END insert_pn_emp_space_assign;
      END XXDL_PN_LOAD_EMP_ASSIGN_PKG;

    893185 wrote:
    can you please tell me what I'm missing. I am getting error below.

    Error(8,12): PLS-00103: Encountered the symbol "C_SEL" when expecting one of the following:     := . ( @ % ; 
    
    CREATE OR REPLACE PACKAGE BODY "XXDL_PN_LOAD_EMP_ASSIGN_PKG"
    AS
    FUNCTION insert_pn_emp_space_assign
    RETURN NUMBER
    IS
    BEGIN
    

    delete 'START' of the previous line

  • PLS-00103: error

    Can you please help me what is missing in my query. I don't know how to put something else.
    Error(459,6): PLS-00103: Encountered the symbol "WHEN" when expecting one of the following:     * & = - + ; < / > at in is mod remainder not rem    <an exponent (**)> <> or != or ~= >= <= <> and or like like2    like4 likec between || member submultiset The symbol ";" was substituted for "WHEN" to continue. 
    Error(485,1): PLS-00103: Encountered the symbol "END" when expecting one of the following:     * & = - + ; < / > at in is mod remainder not rem    <an exponent (**)> <> or != or ~= >= <= <> and or like like2    like4 likec between || member submultiset 
    stmt :=  q'[select distinct pta.project_id project_id,
                   pta.project_number project_number,
                 pta.project_name project_name,
                 pta.task_id task_id,
                 pta.task_number task_number,
                 pta.task_name task_name,
                 pta.award_id award_id,
                 pta.award_number award_number,
                 pta.award_short_name award_short_name
               from xxdl.xxdl_cd_pta_all pta
              where pta.task_id = pta.top_task_id
                and pta.cd_proj_type='Y']';
     
    case when p_in_service = 'IN_SERVICE' then
         stmt := stmt ||      q'[ and (
                             (
                               pta.project_id, pta.task_id, pta.award_id 
                             ) in 
                             (
                               select d.project_id,d.task_id,d.award_id
                                 from xxdl.xxdl_cd_debt_item d,xxdl.xxdl_cd_amortization_status s
                                where d.debt_id = s.debt_id
                                  and s.active = 'Y'
                                  and s.amortization_status not in ('CIP','NONE')
                             )
                             )]'
         when p_in_service = 'NOT YET IN-SERVICE' then
         stmt := stmt ||      q'[ and (
                             (
                               pta.project_id, pta.task_id, pta.award_id 
                             ) in 
                             (
                               select d.project_id,d.task_id,d.award_id
                                 from xxdl.xxdl_cd_debt_item d,xxdl.xxdl_cd_amortization_status s
                                where d.debt_id = s.debt_id
                                  and s.active = ''Y''
                                  and s.amortization_status  in ('CIP','NONE')
                             )
                             )]'
         when p_in_service = 'ALL PROJECTS' then
         stmt := stmt ||      q'[ and (
                             (
                               pta.project_id, pta.task_id, pta.award_id
                             ) in 
                             (
                               select d.project_id,d.task_id,d.award_id
                                 from xxdl.xxdl_cd_debt_item d,xxdl.xxdl_cd_amortization_status s
                                where d.debt_id = s.debt_id
                                  and   s.active = 'Y'
                             )
                              )]'
    end;
    
     
    Published by: 893185 on November 30, 2011 10:59

    Dude, turn off your shift key.

    SQL> declare
      2     p_in_service varchar2(30);
      3     stmt varchar2(30);
      4  begin
      5     case when p_in_service = 'IN_SERVICE' then
      6             stmt := stmt || 'a';
      7          when p_in_service = 'NOT YET IN-SERVICE' then
      8             stmt := stmt || 'b';
      9          when p_in_service = 'ALL PROJECTS' then
     10             stmt := stmt || 'c';
     11          else
     12             stmt := stmt || 'd';
     13     end case;
     14  end;
     15  /
    
    PL/SQL procedure successfully completed.
    
  • Error [PLS-00103: encountered the symbol "CREATE"] using PACKAGE

    Hi guys!
    When I compile this package, I get this error:
    PLS-00103: encountered the symbol "CREATE".

    How can I solve this problem?
    The compiled code is below:


    CREATE OR REPLACE
    PACKAGE CAMPO_PACK AS

    TYPE T_CURSOR IS REF CURSOR;

    PROCEDURE DeleteCode (OSDP NUMBER);

    END CAMPO_PACK;
    -body-
    CREATE or REPLACE PACKAGE BODY CAMPO_PACK as

    PROCEDURE DeleteCode(pCod NUMBER) AS
    BEGIN
    DELETE FROM campo
    WHERE cod = OSDP;
    END DeleteCode;

    END CAMPO_PACK;


    Thanks for the help,
    Anderson



    Published by: user8723300 on 08/13/2009 17:03

    Published by: user8723300 on 08/13/2009 17:04

    I use Oracle SQL Developer

    I know very well of this tool.

    The packet header and body are two separate objects and must be compiled separately. I suspect that the package body is somehow have included in package header and Developer SQL tries to compile all of these at once. You must understand how to compile the header first, then the body. Your code compiles if I use sqlplus. I had to first create the table, so I have included a slash (/) after the packet header and the other after that body. The slash tells sql more to run the buffer (in this case, to compile the object).

    SQL> create table campo (cod number);
    
    Table created.
    
    SQL> CREATE OR REPLACE
      2  PACKAGE CAMPO_PACK AS
      3
      4  TYPE T_CURSOR IS REF CURSOR;
      5
      6  PROCEDURE DeleteCode(pCod NUMBER);
      7
      8  END CAMPO_PACK;
      9  /
    
    Package created.
    
    SQL> CREATE OR REPLACE PACKAGE BODY CAMPO_PACK AS
      2
      3  PROCEDURE DeleteCode(pCod NUMBER) AS
      4  BEGIN
      5  DELETE FROM campo
      6  WHERE cod = pcod;
      7  END DeleteCode;
      8
      9  END CAMPO_PACK;
     10  /
    
    Package body created.
    

    If I remove the slash after the package header, sql more trying to compile all this at once, and I get the same error you get:

    SQL> CREATE OR REPLACE
      2  PACKAGE CAMPO_PACK AS
      3
      4  TYPE T_CURSOR IS REF CURSOR;
      5
      6  PROCEDURE DeleteCode(pCod NUMBER);
      7
      8  END CAMPO_PACK;
      9
     10  CREATE OR REPLACE PACKAGE BODY CAMPO_PACK AS
     11
     12  PROCEDURE DeleteCode(pCod NUMBER) AS
     13  BEGIN
     14  DELETE FROM campo
     15  WHERE cod = pcod;
     16  END DeleteCode;
     17
     18  END CAMPO_PACK;
     19  /
    
    Warning: Package created with compilation errors.
    
    SQL> sho err
    Errors for PACKAGE CAMPO_PACK:
    
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    9/1      PLS-00103: Encountered the symbol "CREATE"
    

Maybe you are looking for

  • By clicking on the Firefox icon on desktop, "isearch.omiga - more ' starts instead.

    I restarted Firefox in safe mode and reset Firefox. Now when I click on the Firefox icon on the desktop, you receive the following message: "Server not found. Firefox can't find the server at isearch.omiga - plus.com. »

  • Download link does not work

    I tried to download El Capitan. For awhile, launchpad showed an icon with the download and it was downloading xMB 2.0Gig. He did it for a while, and then he disappeared and nothing else happened. There is always a grey icon in launchpad indicating wa

  • Sudden unexpected shutdown

    My Satellite maintains close without reason.I suspect it is a protection against overheating, but it happens during any activity despite intensive use, a cooling tray. I wonder if this means that a thermostat has failed OR there is dust debris accumu

  • Serial port empty read buffer

    Hello everyone. I'm currently programming a vi that takes an input of a device in series string and parses this string. The only question that I have is that (probably) between readings, when the buffer is empty, the vi will be parse this buffer empt

  • Two questions about Lifecam Studio webcam

    I intend to use the Lifecam Studio webcam as a security camera (I'm already aware of general limitations of webcams for this application) but I have these questions: (1) is its ability to see in the dark, better than the Lifecam cinema or are they us