PLS-00357: Table, view or unauthorized reference sequence "POC_AD0FFFKMZ6QQ0"

Hello

A scheculer to perform the following procedure.
create or replace procedure GENERATE_LOAD_TYPE (p_module_type in varchar2)
as
cursor c is
select id,view_name
from   poc_test
where  view_name='POC_AD0FFFKMZ6QQ0';


Begin

for c_rec in c loop
    BEGIN
      DBMS_SCHEDULER.create_job (
        job_name        => c_rec.view_name||'_job',
        job_type        => 'PLSQL_BLOCK',
        job_action      => 'BEGIN POC_LOADER('||c_rec.id||','||c_rec.view_name||'); commit; END;',
        start_date      => SYSTIMESTAMP,
        repeat_interval => 'SYSTIMESTAMP + 365 /* 1 Year */',
        enabled         => TRUE);
    exit;
   END;
   
end loop;

end;

exec GENERATE_LOAD_TYPE('1');

PL/SQL procedure successfully completed.
But the task is failed on the following error message:
select additional_info from DBA_SCHEDULER_JOB_LOG where job_name='POC_AD0FFFKMZ6QQ0_JOB'


ORA-06550: line ORA-06550: line 1, column 505:
PLS-00357: Table,View Or Sequence reference 'POC_AD0FFFKMZ6QQ0' not allowed in this context
ORA-06550: line 1, column 476:
PL/SQL: Statement ignored , column :
The problem is with this line:
  job_action      => 'BEGIN POC_LOADER('||c_rec.id||','||c_rec.view_name||'); commit; END;',
When I remove the parameters (for example: c_rec.id | ',' | c_rec.view_name) has worked well.
Please advice.

Thank you

Try to change this line

job_action      => 'BEGIN POC_LOADER('||c_rec.id||','||c_rec.view_name||'); commit; END;',

TO

job_action      => 'BEGIN POC_LOADER('||c_rec.id||','''||c_rec.view_name||'''); commit; END;',

URS

Tags: Database

Similar Questions

  • PLS-00357 on a global temporary table

    Oracle 11g R2

    I am using a dynamic SQL statement to delete rows. The WHERE THERE EXIST uses a global temporary table and it gives me

    PLS-00357: Table, view or reference sequence "TMPPRE_ARC" not allowed in this context

    Any ideas of a work around?

    create global temporary table tmppre_arc
      ( id number)
      ON COMMIT PRESERVE ROWS;
    
    
    CREATE OR REPLACE PROCEDURE test_del
    IS
       v_owner_tbl varchar2(61) := 'test_table'     ;
    BEGIN   /* DELETE_SOURCE */
            EXECUTE IMMEDIATE
                'DELETE FROM ' || v_owner_tbl || ' v ' || chr(10) ||
                'WHERE EXISTS ( SELECT    null '       || chr(10) ||
                'FROM      ' || tmppre_arc || ' r '  || chr(10) ||
                'WHERE       r.id     = v.id )' ;
    END test_del;
    /
    show errors
    
    
    LIsNE/COL ERROR
    -------- -----------------------------------------------------------------
    5/9      PL/SQL: Statement ignored
    8/29     PLS-00357: Table,View Or Sequence reference 'TMPPRE_ARC' not
    allowed in this contenxt
    
    
    
    
    
             allowed in this context
    

    This is false:

    'FROM ' | tmppre_arc | ' r '  || Chr (10) |

    Should be

    "OF tmppre_arc r | Chr (10) |

    SY.

  • The reference to the table, view, or the sequence is not allowed in this context

    Hello

    I am triying to run the SP that I describe below and the OS gives me an error:
    CREATE OR REPLACE PROCEDURE DWARE.P_CSCV_AGR_MONTH_REVENUE
    (
        TBL_NAME VARCHAR2,
        START_DATE DATE,
        RESULT_ OUT NUMBER
      ) AS
      BEGIN
      
      DECLARE 
      
        v_tbl_name VARCHAR2(30);
        v_start_date DATE;
        v_result NUMBER := 0;
        
        v_select_aux VARCHAR2(32767) := ' ';
        v_temp_table VARCHAR2(30);
        v_exists NUMBER;
    
      BEGIN
        v_tbl_name := TBL_NAME;
        v_start_date := START_DATE;
      
        v_temp_table := 'temp_' || v_tbl_name;
        
        SELECT count(*) INTO v_exists FROM tab WHERE lower(tname) = lower(v_temp_table);
        IF (v_exists = 1) THEN
          v_select_aux := '
            DROP TABLE ' || v_temp_table || ' CASCADE CONSTRAINTS PURGE
          ';
          EXECUTE IMMEDIATE (v_select_aux);
          COMMIT;
        END IF;
        
        v_select_aux := 'CREATE TABLE ' || v_temp_table || ' AS 
                                  SELECT ch.date_ month_revenue,
                                       s.date_sub month_sub,
                                       s.codpromoter,
                                       u.OPERATOR,
                                       SUM (ch.total) AS TOTAL_OK
                                       FROM cscv_sub_charges_' || to_char(v_start_date, 'YYYY_MM')|| ' ch
                                       INNER JOIN cscv_subs s
                                       ON ch.id_sub = s.ID
                                       INNER JOIN cscv_users u
                                       ON s.id_user    = u.ID
                                WHERE ch.STATUS = 0
                                GROUP BY ch.date_, s.date_sub, s.codpromoter, u.OPERATOR';
                                
        EXECUTE IMMEDIATE (v_select_aux);
        COMMIT;  
         v_select_aux := '
     INSERT INTO ' || v_tbl_name || ' (
             month_revenue,
             month_sub,
             codpromoter,
             operator,
             TOTAL_0,
             TOTAL_1,
             TOTAL_2,
             TOTAL_3,
             TOTAL_4,
             TOTAL_5,
             TOTAL_6,
             TOTAL_7,
             TOTAL_8,
             TOTAL_9,
             TOTAL_10,
             TOTAL_11
          )
            SELECT 
             month_revenue,
             month_sub,
             codpromoter,
             operator,
             TOTAL_0,
             TOTAL_1,
             TOTAL_2,
             TOTAL_3,
             TOTAL_4,
             TOTAL_5,
             TOTAL_6,
             TOTAL_7,
             TOTAL_8,
             TOTAL_9,
             TOTAL_10,
             TOTAL_11
            FROM 
            (
               SELECT 
                  month_revenue,
                  month_sub,
                  codpromoter,
                  operator,
                  sum(total_ok) total_0,
                  0 total_1,
                  0 total_2,
                  0 total_3,
                  0 total_4,
                  0 total_5,
                  0 total_6,
                  0 total_7,
                  0 total_8,
                  0 total_9,
                  0 total_10,
                  0 total_11
                 FROM '|| v_temp_table ||'
              WHERE to_char(month_sub,''mm/yyyy'') = to_char(sysdate,''mm/yyyy'')
              GROUP BY month_revenue,month_sub,codpromoter, operator
              UNION ALL
              SELECT 
                  month_revenue,
                  month_sub,
                  codpromoter,
                  operator,
                  0,
                  sum(total_ok),
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0
                 FROM '|| v_temp_table ||'
              WHERE to_char(month_sub,''mm/yyyy'') = to_char((to_date(sysdate,''dd/mm/yy'') - INTERVAL ''1'' MONTH),''mm/yyyy'')
              GROUP BY month_revenue,month_sub,codpromoter, operator
              ) 
            GROUP BY month_revenue,
             month_sub,
             codpromoter,
             operator
               ';    
        
        EXECUTE IMMEDIATE (v_select_aux);
        v_result := v_result + SQL%ROWCOUNT;
        COMMIT;
        
        v_select_aux := '
          DROP TABLE ' || v_temp_table || ' CASCADE CONSTRAINTS PURGE
        ';
        EXECUTE IMMEDIATE (v_select_aux);
        COMMIT;
        
        RESULT_ := v_result;
      END;
      END P_CSCV_AGR_MONTH_REVENUE;
    /
    ------------------------------
    BEGIN
    DWARE.P_CSCV_AGR_MONTH_REVENUE(CSCV_AGR_MONTH_REVENUE,'01/01/2010');
    END;
    /
    and the output is:
    Error at line 1
    ORA-06550: líne 2, column 32:
    PLS-00357: The reference to the table, view or sequence 'CSCV_AGR_MONTH_REVENUE'  is not allowed in this context
    ORA-06550: líne 2, column 1:
    PL/SQL: Statement ignored
    What could I do to fix the problem?

    Thanks in advance...

    Hello

    Signature of the procedure is

    CREATE OR REPLACE PROCEDURE DWARE.P_CSCV_AGR_MONTH_REVENUE
    (
    TBL_NAME VARCHAR2,
    START_DATE DATE,
    RESULT_ OUT NUMBER
    ) 
    

    either he's expecting two input parameters, tbl_name in VARCHAR2 and the other START_DATE date format format. Also you need a variable with the number data type to store the value of the PARAMETER RESULT_

    Now, look at the way you call this procedure

     BEGIN
    DWARE.P_CSCV_AGR_MONTH_REVENUE(CSCV_AGR_MONTH_REVENUE,'01/01/2010');
    END;
    /
    

    first parameter must be a VARCHAR2, so place CSCV_AGR_MONTH_REVENUE in single quotes.
    second parameter must be a date, so use to_date() function.
    Finally declare a variable with the data type of number to maintain the value of the parameter RESULT_

    Something like this:

    declare
    t_num number;
    begin
    a('CSCV_AGR_MONTH_REVENUE',to_date('01/01/2010','MM/DD/YYYY'),t_num);
    dbms_output.put_line(t_num);
    end;
    

    Vivek L

  • Pass the name of the table as parameter PLS-00357

    create or replace
    PROCEDURE universal_p)
    tab in VARCHAR2,
    Col in VARCHAR2,
    WHR IN VARCHAR2: = NULL)
    IS
    TYPE cv_type IS REF CURSOR;
    CV cv_type;
    Val VARCHAR2 (32767).
    BEGIN
    OPEN FOR CV
    "SELECT" | Col |
    'FROM ' | tab |
    'WHERE ' | NVL (w/h, '1 = 1');

    LOOP
    CV FETCH IN val;
    WHEN the OUTPUT cv % NOTFOUND;
    IF ROWCOUNT = 1 CV(%)
    THEN
    DBMS_OUTPUT. PUT_LINE (RPAD ('-', 60, '-'));
    DBMS_OUTPUT. PUT_LINE)
    "The contents of" |
    SUPERIOR (tab) | '.' || En_HAUT (col));
    DBMS_OUTPUT. PUT_LINE (RPAD ('-', 60, '-'));
    END IF;
    DBMS_OUTPUT. Put_line (val);
    END LOOP;

    CLOSE cv;
    END;
    *********************************
    WHEN I CALL THIS PROCEDURE I might see error

    ORA-06550: Table, view or sequence of reference not allowed in this context.
    PLS-00357:

    Can someone can help me, please?
    WHEN

    Published by: user6446424 on 11.3.2010 13:59

    Works for me:

    SQL> create or replace
      2  PROCEDURE universal_p (
      3  tab IN VARCHAR2,
      4  col IN VARCHAR2,
      5  whr IN VARCHAR2 := NULL)
      6  IS
      7  TYPE cv_type IS REF CURSOR;
      8  cv cv_type;
      9  val VARCHAR2(32767);
     10  BEGIN
     11  OPEN cv FOR
     12  'SELECT ' || col ||
     13  ' FROM ' || tab ||
     14  ' WHERE ' || NVL (whr, '1 = 1');
     15
     16  LOOP
     17  FETCH cv INTO val;
     18  EXIT WHEN cv%NOTFOUND;
     19  IF cv%ROWCOUNT = 1
     20  THEN
     21  DBMS_OUTPUT.PUT_LINE (RPAD ('-', 60, '-'));
     22  DBMS_OUTPUT.PUT_LINE (
     23  'Contents of ' ||
     24  UPPER (tab) || '.' || UPPER (col));
     25  DBMS_OUTPUT.PUT_LINE (RPAD ('-', 60, '-'));
     26  END IF;
     27  DBMS_OUTPUT.PUT_LINE (val);
     28  END LOOP;
     29
     30
     31  CLOSE cv;
     32  END;
     33
     34  /
    
    Procedure created.
    
    SQL> exec universal_p('EMP','ENAME')
    ------------------------------------------------------------
    Contents of EMP.ENAME
    ------------------------------------------------------------
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from v$version
      2  ;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    

    Max
    http://oracleitalia.WordPress.com

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

  • Line display only 1 in a table view

    Pls... is there a way to display only 1 row in a table view (OBIEE 11 g)?

    (I know it's possible in the narrative view...)

    TXS

    A.L.

    Try with pagination option in a table view. You can display a single default line.

    Thank you

    Prasanna

  • Table/view permissions

    I have a dilemma. I was put in place with a database account limited to query an oracle 11 database, it's actually the database backend behind product oracle eBusiness suite. I still find tables/views, I need to question him, but when I query them i.e. Select * from table, it returns 0 results.

    However, I have proven that they do sometimes return no results because the limited account I has limited permissions, then it's not back 0 results that there is no data in the table/view, its because my account is unable to interview him because of permissions. If we execute the query even with an account like applications it returns results.

    Is there a query to list all the tables/views can query my database account. And what is required to run such a query, i.e. APPS etc.

    Or, if I use the table/view as a parameter, if there any question, so that I can run for say A table/view, these accounts have these permissions on the table to display the data?

    Thank you

    Yes, WiZ made reference to ALL_TAB_PRIVS and USER_TAB_PRIVS to get the tables for which the current user has access to, or belonging to the current user.
    But we cannot check for other objects of the user if the current user does not have access to this table in the other schema.

    I hope this helps.

    Murali Mohan

  • Saving objects (tables, views, etc.) db

    Hello
    After connecting with a liability of the developer, I see a submenu of "Database", containing the menu entries "Tables", "Views", "Sequences"...
    When these functions are used...? To set/register custom tables, views, sequences with the libraries of Application objects...?
    If so, it takes to... in what circumstances... .and?
    Someone developed some modules/reports to custom form using the custom db objects that were not saved...!

    Note: I use EBS 11.5.10.2

    Thank you very much
    SIM

    Registration is not necessary for your developments tailored to work. However, if you plan to use some standard features (i.e. the flexfields, attachments) on your custom objects, you will need to save certain information.

  • [OBIEE 11 g] Create customized to group columns in a table view column header

    Hello world

    I got a requirement to group certain columns in the table view with a custom column header name (for example to create a two-level header).

    The layout I have now:

    [Jan]     [February]     [Mar]     [Apr]     [May]     [June]     [Jul]     [August]     [Total sales]

    -----------------------------------------------------------------------------------------------------------------------

    1          2          3            4          5           6           7          8           36

    The layout I want to achieve:

    [                  Q1                    ] [                   Q2                   ]    

    [Jan]     [February]     [Mar]     [Apr]     [May]     [June]     [Jul]     [August]     [Total sales]

    -----------------------------------------------------------------------------------------------------------------------

    1          2          3            4          5           6           7          8           36

    I use Table View, is it possible to get the above provision? Any comments appreciated. Thank you.

    See you soon,.

    Kayip

    Hello

    It is a simple parameter, it is unpacking already...

    The property "of the topic folder" of your columns allows you to enter the required text.

    PS: Do you really have columns in your field with the name of the month? Is it not something better managed with a hierarchy of real time and using a pivot to display the month columns? In this case the grouping of quarters is already there...

  • Complete export dashboard in excel gives error generate document in the table view of subtotals

    Hi all

    We have dashboard with several tabs and you try to export the whole dashboard in excel.

    Excel file is generated with all tabs on the dashboard as the leaves, but few of these leaves are empty with error message of document generation in the first cell.

    After further analysis, we concluded that the cause is seen with subtotals on table. PivotTables with subtotals are generated correctly.

    Workaround obvious to re-create the table views in the articulation points is not possible due to a large number of reports.

    We run Oracle Business Intelligence Product Version 11.1.1.7.150120 (Build 150113.1200 64-bit)

    Any ideas or solutions to this problem would be appreciated.

    Thank you;

    Klaudio

    We just found guilty

    Lines per page to display in the table must be 999999999 max which is more than enough for our needs.

  • Remove sorting in a Pivot table view

    Hi people,

    How to remove the column header sort options in the pivot table view?

    Thank you

    AJ

    You want to remove the small arrows on the column header in a pivot view?

    If so, the options are available in the analysis criteria tab. The problem is it cannot be set to a point of view, they perform the whole analysis

    In the criteria-> Properties tab right next to the filters and the stages of selection analysis-> Interactions tab.

    Mark, if this can help

  • How to not display the column heading in the table view?

    I don't want to display the column header in the table display, how I can make?

    If you use JavaFX 8, you can use the following text in an external style sheet:

    .table-view .column-header-background {
      -fx-pref-height : 0 ;
    }
    

    If you use JavaFX 2.2, the - fx-pref-height attribute is not available in css, so I think that you must resort to a search:

    final Region tableHeader = (Region)table.lookup(".column-header-background");
        tableHeader.setPrefHeight(0);
    

    As always, I am obliged to point out that I don't really like the research. Sometimes, they seem to be the only way, however.

  • To access the tables/views outside of the APEX

    According to the request of Andrew as a separate and somewhat more extensive thread here:

    We have several tables/views created under some schemes; all equipped with grants and public synonyms.

    These tables is visible and accessible by all users-ORACLE (via forms and States - as it has recently used)

    Now, I started with APEX a few days ago - OK, seems to work - but with objects such only created inside of this APEX workspace.

    This kind of things outside OF THE SUMMIT is not visible.

    Why? What is missing? It was one of my questions 1.

    How do these objects visible in the APEX? Of course, we do not want all that stuff again, and existing in bulk.

    I guess that as a very common problem.

    (One solution I found already: creating views inside the APEX to access objects outside.) "It is not comfortable).

    Thank you

    Wolfgang

    Object browser is rudimentary, but behaves in the same way that developer SQL will report on these objects.

    Notice the 'Plan' selection list at the top right.

    If you have tried ' select * from abcxyz "SQL commands, you should have success - in the same way, you should have success in the creation of form/report on abcxyz via the synonym.

    Scott

    .

  • Change a Table View header

    I need to change the header to a tableview and I tried this:
    .table-view {
        -fx-background-color: rgb(70,70,70);
        -fx-text-fill: white;
        -fx-border-style: solid;
        -fx-border-color: transparent;
    /*    -fx-border-insets: 0 1 1 0, 0 0 0 0;*/
        -fx-border-width: 0.083333em, 0.083333em;
    }
    
    .table-view .column-header{
        -fx-border-style: solid;
        -fx-border-color: rgb(130, 130, 130);
        -fx-border-radius: 5px;
        -fx-background-radius: 5px;
        -fx-border-insets: 0 1 1 0, 0 0 0 0;
        -fx-border-width: 0.083333em, 0.083333em;
    }   
        
    .table-view .column-header .label{
        -fx-font-size: 12px;
        -fx-text-fill: white;
    }
    
    .table-view .column-header-background {
        -fx-background-radius: 5px;
        -fx-font-family: "Calibri";
        -fx-background-color:  rgb(50,50,50);
        
    }
    However, I can't edit any table header, but only the headers of each column.

    Sorry for English errors and grammar. I'm Spanish speaking


    I put an image to make it more clear

    http://img823.imageshack.us/img823/49/tableexample.PNG

    Published by: biochemistry43 on October 30, 2012 13:17

    I have not tested, but try

    .table-view .column-header, .table-view .filler {
     ...
    }
    
  • How to use RIDC for request WebCenter content Tables/views

    Hello

    Can I use RIDC content query API WebCenter 11 g Tables/views, if so, how can I achieve this?

    Kind regards

    Yes, you can.

    Call one of the schema (for example, GET_SCHEMA_VIEW_VALUES) and you will receive a set of results that you can iterate on.

    http://docs.Oracle.com/CD/E21764_01/doc.1111/e11011/c05_core.htm#BABBABBF

    Some examples of code RIDC links can be found here: http://jonathanhult.com/blog/2012/07/ridc-versus-cis/

    Jonathan
    http://jonathanhult.com

Maybe you are looking for

  • Re: Satellite A200 - 1 GB - strange ripples on the external LCD

    H, When I try to connect my laptop to my Samsung 32 "LCD with VGA, I have strange ripples on the screen.I tried to change any settings in my computer and my TV and it's still there. How can I fix?It is almost impossible to look like that. Thank you.

  • How to install Vista on Qosmio G30?

    Hello I bought vista ultimate 32 bit and want to install it on my laptop g30, y at - there somewhere an instruction step by step, how to install it without having any problems? I did a forum search, but only found the problem specific threads.Thanks

  • Sculpt keybopard issues on the computer.

    Hello I bought the keyboard ergonomic microsoft, and it stopped working about three weeks after purchase. After changing the batteries (batteries had to be stolen from kids toys... they are not very happy!), it works again, but the most annoying is t

  • HP ENVY 700-406: drivers

    Hi friends, during the Christmas holidays I bought a HP ENVY 700 PC, I tried to adjust Windows 8.1 but I didn't really take care of him so I formatted the HARD drive and put Windows 7 on it instead of this, everything works ok except for the drivers

  • Deleted folder and Error Message When you quit Mail

    My deleted items folder is projection 900 + files but the folder is empty.  When I go out, I get "unknown error occurred".  Then another pop box saying "certain elements in the"Deleted items"folder can not be deleted.  I think I have a pop up saying