Error ORA-14450 function parallel pipeline with PRAGMA AUTONOMOUS_T

Hello
I have a problem with a function.
I define this types:
CREATE or REPLACE TYPE utrOutRrsc () AS OBJECT
Id_ressource NUMBER
, Resource_tp varchar2 (50)
, Resource_nm varchar2 (256)
, Message_tp VARCHAR2 (50)
, Message_tx VARCHAR2 (4000)
);
CREATE or REPLACE TYPE uttResources AS TABLE OF THE utrOutRrsc;

I defined a package with this code:
TYPE utrResource () IS RENDERING
Id_ressource rdbmx.resources_vt.resource_id%TYPE
Resource_tp rdbmx.resources_vt.resource_tp%TYPE
Resource_nm rdbmx.resources_vt.resource_nm%TYPE);
TYPE rc_Resources IS REF CURSOR RETURN cons_ref_pkg.utrResource;


FUNCTION CONS_Process_Pool)
cur_Pools IN Conshope_pkg.rc_Resources
, icadena_tp IN VARCHAR2: = '-1212121212'. "
)
RETURN uttResources
PIPELINED PARALLEL_ENABLE (PARTITION cur_Pools IN ALL)
IS
PRAGMA AUTONOMOUS_TRANSACTION;

LTypecons_fl NUMBER: = itypecons_fl;
r_pools rdbmx_site. Conshope_pkg.utrResource;
r_Out utrOutRrsc;

blnInit BOOLEAN: = TRUE;
numPos NUMBER;
I have SEVERAL;
LMessage_tp VARCHAR2 (50): = "OK";
LMessage_tx VARCHAR2 (4000): = NULL;

BEGIN
LOOP
SEEK cur_Pools INTO r_pools;
EXIT WHEN cur_Pools % NOTFOUND;

Start
insert into mytable values (r_pools.resource_id, r_pools.resource_tp, "other information");
COMMIT;
exception
L_Message_tp: = "ERROR";
LMessage_tx: = sqlerrm;
end;

r_out. Id_ressource: = r_pools. Id_ressource;
r_out. Resource_tp: = r_pools. Resource_tp;
r_out. Resource_nm: = r_pools. Resource_nm;
r_out. Message_tp: = LMessage_tp;
r_out. Message_tx: = LMessage_tx;

COURSE OF ACTION (r_out);
END of LOOP / * cur_Pools * /.

MSG_LOG ('Salida CONS_Process_Pool (Gestor: ' | r_pools.)) Resource_nm | () ', LTypeCons_fl, 'CONNECT');
RETURN;

END CONS_Process_Pool;

The error is worth trying.

I need to help you, please

In addition, as damorgan noted, "There are so many things wrong here", keep in mind:

>
Restrictions on independent operations}

You cannot execute a statement LINE of conduct in your own routine
your autonomous transaction is open. You must close the autonomous transaction
before you run the statement LINE of conduct. This is usually accomplished by
validation or restoring the transaction independent before running the PIPE
Return LINE. >

SY.

Tags: Database

Similar Questions

  • Error ORA-00911 create a view with PL/SQL

    Hello. Working with SQL Developer, I'm writing a procedure that creates a view.
    After a compilation successful, whenever I try to run it, I get an error ORA-00911 and I'm not able to find the reason.
    Here is my code. Thanks in advance.
      CREATE OR REPLACE PROCEDURE "DWH_STAR"."STORICO_DATA" (
      DATA_INPUT IN VARCHAR2
    )AS
    BEGIN
      EXECUTE IMMEDIATE '
        CREATE OR REPLACE FORCE VIEW DWH_STAR.V_PORT_STOR_DATA (DATA_DESC, CLIENTE_KEY, PRODOTTO_KEY, AGENTE_KEY, TIPOLOGIA_KEY, 
        NUM_ORDINE, NUM_UNITA, RICAVO_LORDO, RICAVO_NETTO, COSTO_STD_TOTALE, GROSS_PROFIT) AS 
        SELECT
          dt.DATA_DESC,
          fv.CLIENTE_KEY,
          fv.PRODOTTO_KEY,
          fv.AGENTE_KEY,
          fv.TIPOLOGIA_KEY,
          fv.NUM_ORDINE,
          SUM (NUM_UNITA) NUM_UNITA,
          SUM (RICAVO_LORDO) RICAVO_LORDO,
          SUM (RICAVO_NETTO) RICAVO_NETTO,
          SUM (COSTO_STD_TOTALE) COSTO_STD_TOTALE,
          SUM (GROSS_PROFIT) GROSS_PROFIT
        FROM
          F_VENDUTO fv, D_TEMPO dt
        WHERE
          fv.TEMPO_KEY = dt.TEMPO_KEY
          AND TO_NUMBER(TO_CHAR(dt.DATA_DESC,''YYYYMMDD'')) <=' || DATA_INPUT ||'
        GROUP BY
          fv.CLIENTE_KEY,
          fv.PRODOTTO_KEY,
          fv.AGENTE_KEY,
          fv.TIPOLOGIA_KEY,
          fv.NUM_ORDINE,
          dt.DATA_DESC
        ORDER BY 
          dt.DATA_DESC, 
          fv.CLIENTE_KEY,
          fv.PRODOTTO_KEY,
          fv.AGENTE_KEY,
          fv.TIPOLOGIA_KEY,
          fv.NUM_ORDINE;
        UNION
        SELECT
          dt.DATA_DESC,
          fs.CLIENTE_KEY,
          fs.PRODOTTO_KEY,
          fs.AGENTE_KEY,
          fs.TIPOLOGIA_KEY,
          fs.NUM_ORDINE,
          - SUM (NUM_UNITA) NUM_UNITA,
          - SUM (RICAVO_LORDO) RICAVO_LORDO,
          - SUM (RICAVO_NETTO) RICAVO_NETTO,
          - SUM (COSTO_STD_TOTALE) COSTO_STD_TOTALE,
          - SUM (GROSSO_PROFIT) GROSS_PROFIT
        FROM
          F_SPEDITO fs, D_TEMPO dt
        WHERE
          (fs.CAUSA_RESO_KEY = 0
           AND fs.TEMPO_KEY = dt.TEMPO_KEY
           AND TO_NUMBER(TO_CHAR(dt.DATA_DESC,''YYYYMMDD'')) <=' || DATA_INPUT ||'
           )
        GROUP BY
          fs.CLIENTE_KEY,
          fs.PRODOTTO_KEY,
          fs.AGENTE_KEY,
          fs.TIPOLOGIA_KEY,
          fs.NUM_ORDINE,
          dt.DATA_DESC
        ORDER BY 
          dt.DATA_DESC, 
          fs.CLIENTE_KEY,
          fs.PRODOTTO_KEY,
          fs.AGENTE_KEY,
          fs.TIPOLOGIA_KEY,
          fs.NUM_ORDINE
      '
      ;
    END;
    /
     

    delete the order and the semicolon (;) of the first select statement. I hope you know that the operator union the same set of columns to be selected.

    But try to avoid to create objects on the fly, unless and until it is absolutely necessary and inevitable.

    Concerning

    REDA

    Published by: R.Subramanian on June 21, 2010 07:52

    Published by: R.Subramanian on June 21, 2010 07:53

  • Form trigger error ORA-22816: feature not supported with RETURNING clause

    Hi Apex developers.

    I created the form to the poster with the INSTEAD of trigger. Everything works very well for the UPDATE and DELETE. But to INSERT the "automatic line (DML) treatment" trigger ORA-22816: feature not supported with RETURNING clause. When I disable the INSTEAD OF trigger it start work very well too. But I have to use INSTEAD OF trigger for safety reasons.

    Meet someone too the question?

    What is workaroud for the question?

    Thank you very much.

    Michaud

    Hi Martin,

    MMH, it beats me. You could try with tracing active sql (add & ptrace = YES to your URL), see what actually running.

    Cordially Jens

  • Function in pipeline with immediate execution

    Hello Experts,

    I created a tube lined function to run immediately, cause of sub condition;
    (1) columns where clause dynamically.
    (2) I want to know the data stored in above the dynamic columns.
    (3) I want to use in the report, so I don't want to insert it into a table.

    I have created a TYPE, then thanks to run immediately, I got the query and the result of this query will be stored in the TYPE.
    But when you call the function I get
    ORA-00932: inconsistent data types: expected - was -.

    Below is my function and type, let me know I am wrong and it is my correct logic.
    CREATE OR REPLACE TYPE OBJ_FPD AS OBJECT
                      (LOW_PLAN_NO VARCHAR2 (40),
                       FPD VARCHAR2 (5),
                       SERIAL_NO NUMBER,
                       CEDIA_CODE VARCHAR2 (2),
                       DT DATE);
    ----                                      
    CREATE OR REPLACE TYPE FPD_TBL_TYPE AS TABLE OF OBJ_FPD;
    ----
    CREATE OR REPLACE FUNCTION FUNC_GET_FPD_DATE (P_LOW_PLAN_NO    VARCHAR2,
                                                  P_CEDIA_CODE     VARCHAR2,
                                                  P_SERIAL_NO      NUMBER)
       RETURN FPD_TBL_TYPE
       PIPELINED
    AS
       CURSOR C1
       IS
              SELECT 'FPD' || LEVEL TBL_COL
                FROM DUAL
          CONNECT BY LEVEL <= 31;
    
       V_STR        VARCHAR2 (5000);
    
       V_TBL_TYPE   FPD_TBL_TYPE;
    BEGIN
       FOR X IN C1
       LOOP
          V_STR :=
                'SELECT A.low_PLAN_NO,
               A.FPD,
               A.SERIAL_NO,
               A.cedia_code,
               TO_DATE (
                     SUBSTR (FPD, 4, 5)
                  || ''/''
                  || TO_CHAR (C.low_PLAN_PERIOD_FROM, ''MM'')
                  || ''/''
                  || TO_CHAR (C.low_PLAN_PERIOD_FROM, ''RRRR''),
                  ''DD/MM/RRRR'')
                  DT FROM ( SELECT low_PLAN_NO, '
             || ''''
             || X.TBL_COL
             || ''''
             || ' FPD, '
             || X.TBL_COL
             || ' SPTS, SERIAL_NO, cedia_code FROM M_low_PLAN_DETAILS WHERE NVL('
             || X.TBL_COL
             || ',0) > 0 AND SERIAL_NO = '
             || P_SERIAL_NO
             || ' AND cedia_code = '
             || ''''
             || P_CEDIA_CODE
             || ''''
             || ' AND low_PLAN_NO = '
             || ''''
             || P_LOW_PLAN_NO
             || ''''
             || ') A,
               M_low_PLAN_DETAILS B,
               M_low_PLAN_MSTR C
         WHERE     A.low_PLAN_NO = B.low_PLAN_NO
               AND A.cedia_code = B.cedia_code
               AND A.SERIAL_NO = B.SERIAL_NO
               AND B.low_PLAN_NO = C.low_PLAN_NO
               AND B.CLIENT_CODE = C.CLIENT_CODE
               AND B.VARIANT_CODE = C.VARIANT_CODE
    CONNECT BY LEVEL <= SPTS';
    
          EXECUTE IMMEDIATE V_STR INTO V_TBL_TYPE;
    
          FOR I IN 1 .. V_TBL_TYPE.COUNT
          LOOP
             PIPE ROW (OBJ_FPD (V_TBL_TYPE (I).LOW_PLAN_NO,
                                V_TBL_TYPE (I).FPD,
                                V_TBL_TYPE (I).SERIAL_NO,
                                V_TBL_TYPE (I).CEDIA_CODE,
                                V_TBL_TYPE (I).DT));
          END LOOP;
       END LOOP;
    
       RETURN;
    EXCEPTION
       WHEN OTHERS
       THEN
          RAISE_APPLICATION_ERROR (-20000, SQLCODE || ' ' || SQLERRM);
          RAISE;
    END;
    Waiting for your point of view.

    Kind regards

    ORA Ash wrote:
    This result is coming as FPD4 has 2 as a value, then there will be two records to the result with column date (DT).
    Your query is perfect only thing is that I have to go to connect the name of the column immediately above as below;

    AND FPD = 'FPD14'
    CONNECT BY LEVEL <= SPTS;
    

    So, if possible, please let me know is there a better way to spend the column name, to get the correct data.

    Well, we don't have any example for working with information and the expected results of these data in the example, then it is very difficult for us to understand exactly what is affected by the query.

    What happens if you delete the connection by clause? Why must you connect him by clause in your query? It is not clear what you include that for (like I said).

  • Function in pipeline with dynamic query

    Hi all

    ORCL worm: 11g R2.

    I'm operator function table in pipeline of the Oracle.

    It works very well for static SQL.

    create or replace package test13_pkg as

    type r_disc_req is (number of disc_line_id,

    number of req_id);

    type t_disc_req is table of the r_disc_req;

    function F_GetDiscReq return t_disc_req in pipeline;

    procedure P_ProcessDiscReq;

    end;

    CREATE or REPLACE PACKAGE test13_pkg BODY

    AS

    FUNCTION F_GetDiscReq

    RETURN t_disc_req

    PIPELINED

    IS

    lo_disc_req r_disc_req;

    BEGIN

    FOR r_row IN (SELECT disc_line_id, req_id

    Of edms_disc_lines_stg

    WHERE ROWNUM < 10)

    LOOP

    lo_disc_req.disc_line_id: = r_row.disc_line_id;

    lo_disc_req.req_id: = r_row.req_id;

    COURSE OF ACTION (lo_disc_req);

    END LOOP;

    END F_GetDiscReq;

    PROCEDURE P_ProcessDiscReq

    AS

    ln_totalRecords NUMBER;

    BEGIN

    SELECT COUNT (*)

    IN ln_totalRecords

    Of t1, TABLE edms_disc_lines_stg (F_GetDiscReq ()) t2

    WHERE t1.disc_line_id = t2.disc_line_id AND t1.req_id = t2.req_id;

    Dbms_output.put_line (ln_totalRecords);

    END;

    END;

    Start

    test13_pkg. P_ProcessDiscReq();

    end;

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

    How he put for dynamic sql.

    FUNCTION F_GetDiscReq (p_filter1 in NUMBER, p_filter2 number, p_filter3 number)

    RETURN t_disc_req

    PIPELINED

    IS

    lo_disc_req r_disc_req;

    l_sql varchar2 (4000): = ' SELECT disc_line_id, req_id

    To edms_disc_lines_stg ';

    l_where_clause varchar2 (4000): = 'WHERE 1 = 1';

    BEGIN

    IF p_filter1 IS NOT NULL THEN

    l_where_clause: = l_where_clause | "AND filter1 = ' | p_filter1;

    END IF;

    IF p_filter2 IS NOT NULL THEN

    l_where_clause: = l_where_clause | "AND filter1 = ' | p_filter2;

    END IF;

    IF p_filter3 IS NOT NULL THEN

    l_where_clause: = l_where_clause | "AND filter1 = ' | p_filter3;

    END IF;

    l_sql: = l_sql | l_where_clause;

    -I'm stuck here.

    FOR r_row IN (l_sql)

    LOOP

    lo_disc_req.disc_line_id: = r_row.disc_line_id;

    lo_disc_req.req_id: = r_row.req_id;

    COURSE OF ACTION (lo_disc_req);

    END LOOP;

    END F_GetDiscReq;

    Could you please guide me here?

    THX

    Rod.

    Hello

    It is very doubtful, if you need or want dynamic SQL for this task.

    If you do so, however, here's a way to do it:

    FUNCTION F_GetDiscReq
    (p_filter1 IN edms_disc_lines_stg.filter1%TYPE
    p_filter2 IN edms_disc_lines_stg.filter1%TYPE


    p_filter3 IN edms_disc_lines_stg.filter1%TYPE
    )
    RETURN t_disc_req
    PIPELINED
    IS
    lo_disc_req r_disc_req;
    l_sql varchar2 (4000): = ' SELECT disc_line_id, req_id
    To edms_disc_lines_stg ';
    l_where_clause varchar2 (4000): = 'WHERE 1 = 1';

    c SYS_REFCURSOR;
    BEGIN
    IF p_filter1 IS NOT NULL THEN
    l_where_clause: = l_where_clause | "AND filter1 ="' | p_filter1 | '''';
    END IF;
    IF p_filter2 IS NOT NULL THEN
    l_where_clause: = l_where_clause | "AND filter2 ="' | p_filter2 | '''';
    END IF;
    IF p_filter3 IS NOT NULL THEN
    l_where_clause: = l_where_clause | "AND filter3 ="' | p_filter3 | '''';
    END IF;
    l_sql: = l_sql | l_where_clause;

    -dbms_output.put_line (l_sql |) "= l_sql");   -For debugging

    C OPEN FOR l_sql;
    LOOP
    Fetch c lo_disc_req;
    EXIT WHEN c % NOTFOUND;

    COURSE OF ACTION (lo_disc_req);
    END LOOP;
    END F_GetDiscReq;

    Static SQL, in general, will be more effective than dynamic SQL.

    Because you need dynamic SQL statements, there are ways that the above function could be made more effective.  If this is a problem, make sure that you understand what it is doing before you try to improve it.

  • Pipeline raised ORA-06519 function: active autonomous transaction detected

    Hi all

    My name is John and I have a problem I need to share with you the guru and the experts. I created the following function of pipeline under user Oracle ABC:

    CREATE or replace FUNCTION SomeFunction(p_from_date DATE, p_to_date DATE) T_TAB_A RETURN pipelined
    IS
    PRAGMA autonomous_transaction;
    BEGIN
    DELETE FROM temp_rcm;

    INSERT INTO temp_rcm
    SELECT * FROM int.facility fd.
    int. Capacity co
    WHERE co.resource_name = fd.resource_name
    AND co.trade_date = fd.trade_date
    AND co.trade_date BETWEEN p_from_date AND p_to_date;

    COMMIT;

    FOR rec IN (SELECT co.*
    OF temp_rcm co
    o left join int.outage
    WE (o.flag = 'Y')
    AND o.reason_flag = 'F'
    AND o.INTERVAL = co. INTERVAL OF
    AND co.resource_name = o.resource_name)
    ORDER OF co. MEANTIME,
    Co.Name) LOOP
    pipe ROW (T_A (CRE. INTERVAL, rec.trade_date,
    Rec.resource_name, Rec.day_of_week_long, rec.working_day, rec.peak));
    END LOOP;

    RETURN;
    END SomeFunction;


    I could compile and create the function SomeFunction successfully, but when I executed the following command:

    Select * from table (SomeFunction (to_date ('01 / 01/2010 ', to_date('01/01/2010')));)

    I went with the Oracle error: ORA-06519: active autonomous transaction detected and restored

    I searched on the web, such Oracle error occurs when the function has a missing "COMMIT" or "ROLLBACK" command inside an autonomous_transaction. But the fact is that I have already included the "COMMIT"; in the function. I suspected that the error was caused by the paintings that I did against (such as int.facility and int.capacity) were all the views which belonged to another schema called int. Or is it something that miss me in the service? Thank you for your time and your help.

    Kind regards
    John

    This isn't how a ref cursor is used in general. See this thread: {: identifier of the thread = 886365}

    I can't really answer your question without knowing what kind of client you are using (Java, c#, etc.).

    However, the thread should shed a lot of light on the ref Cursor.

  • Import complete with grid (datapump) error ora-39083 control

    11.1.0.7 export to any 11.2.0.1 with grid control gives the following error in the import log:

    Treatment of type of object DATABASE_EXPORT, SYSTEM_PROCOBJACT, PRE_SYSTEM_ACTIONS, PROCACT_SYSTEM
    ORA-39083: Type as procact_system cannot be created with the object error:
    ORA-20000: Incompatible Version of the Workspace Manager installed
    Because sql is:
    BEGIN
    declare the worm varchar2 (100); entire dummy; vdummy varchar2 (30); compile_exception EXCEPTION; PRAGMA E
    XCEPTION_INIT (compile_exception,-06550); invalid_table EXCEPTION; PRAGMA EXCEPTION_INIT(invalid_table,-00942); createErrorProc procedure is immediately start run "create or replace function system.wm$ _check_install return boolean is begin to return true"
    Treatment of type of object DATABASE_EXPORT/SYSTEM_PROCOBJACT/PROCOBJ
    ORA-39083: Type THAT PROCOBJ cannot be created with the object error:
    ORA-29357: AUTO_TASK_CONSUMER_GROUP object already exists
    Because sql is:
    BEGIN
    dbms_resource_manager.create_consumer_group ('AUTO_TASK_CONSUMER_GROUP', 'Group consumer system operational maintenance','R)
    ROUND - ROBINe); COMMIT; END;

    ORA-29357: AUTO_TASK_CONSUMER_GROUP object already exists

    So what can we do for you?

  • Impdp fails with error ORA-39779

    database version: 11.2.0.4.0

    compatible parameter: 11.2.0.0.0

    Sparc 64-bit OS

    Hello guys I am confronted with the error "ORA-39779: type '< schema2 >'". "< type_name >' not found or conversion to the latest version is not possible while import"while trying to import into a target database. "

    Where to I checked all told them to use the transform parameter = oid:n, I've used this setting and I still get the error.

    in a thread, said, maybe it's because users are already created in the database until the import began.

    Someone faced this problem in the past, please help me.

    Thank you

    expdp settings file

    Directory = < directory_name >

    dumpfile = < dumpfile_name > _%U.dmp

    logfile = < logfile_name > .log

    parallel = 8

    compression = all

    schemas = schema1, schema2, schema3

    exclude = grant

    Impdp settings file

    Directory =< < directory_name > >

    dumpfile = <dumpfile_name > _%U.dmp

    logfile = <logfile_name> .log

    parallel = 8

    schemas =schema1, schema2, schema3

    remap_schema =schema1:schema1, schema2:schema2, schema3:schema3

    transform = oid:n

    REMAP_TABLESPACE = < tablespace_1 >: < tablespace_2 >

    Hello guys, this is supported

    Action taken:

    When the schema has been imported, the DDL of the tables are already created.

    I come from a content import = data_only export of the source database for only tables that have failed, then imported again.

  • Changing table - SQL error: ORA-04091: table XYZ is changing, function of triggering/can not see

    Hi all

    I am a newbie to Oracle and I am faced with the above error. Please see the below code snippets. Can someone please tell what I am doing wrong? Thank you in advance.

    Thank you

    CREATE TABLE ABC

    (

    ID VARCHAR2 ENABLE NUMBER NOT NULL,

    FIELD1 ACTIVATE THE NUMBER NOT NULL,

    FIELD2 ACTIVATE THE VARCHAR2 (8 BYTE) NOT NULL,

    CONSTRAINT JOB_PK PRIMARY KEY (ID)

    )

    ;

    CREATE TABLE XYZ

    (

    ACTIVATE THE NUMBER 4 R_ID NOT NULL,.

    ID VARCHAR2 ENABLE NUMBER NOT NULL,

    Column1 NUMBER (2.0) default 0.00,.

    Column2 NUMBER (2.0) default 0.00,.

    COLUMN3 NUMBER (2.0).

    NUMBER (2.0) TOTAL 0.00 default.

    CONSTRAINT TRIP_PAYMENT_PK PRIMARY KEY (ID)

    )

    ;

    create or replace trigger trigger1

    After Insert on XYZ

    for each line

    Declare

    number of newTotal;

    Start

    newTOTAL: =: new. Column1 +: new. Column2 +: new. COLUMN3;

    setting a day of XYZ together Total = newTotal;

    end;

    Insert into ABC (1, 45, ' Demo');

    insertion in XYZ (1, 1, 12.50, 10.20 33,50, ");

    Error report:

    SQL error: ORA-04091: table XYZ is changing, function of triggering/can not see

    Try one before line

    create or replace trigger trigger1

    before inserting on XYZ

    for each line

    Start
    : new. TOTAL: =: new. Column1 +: new. Column2 +: new. COLUMN3;
    end;

  • Help with error - 934 group function is not allowed here

    Hey there will, I'm having problems with a request and just does not know how to do it without error.

    I'm trying to get all the employee emerging infectious diseases that have less than 2 number max of DID (dependants) in the table.

    It's my current query

    SELECT Employee.LName. ' ' || Employee.Fname as Full_Name, Employee.EID

    The left outer JOIN employee depends on Employee.EID = Dependent.EID

    Having Count (DID)--2 > ((select Max (N) as From (SELECT Employee.EID, Count (DID) As N FROM Employee Inner Join Dependent On Employee.EID = Dependent.EID group by Employee.EID, Count (DID))) N)

    Order of Employee.Lname, Employee.Fname

    Which gives me an error on column 4, no matter what I do. If I remove the Count (DID) in the group by clause (which I tried it earlier), it gives me a is not an error of the function of single group...

    The most frustrating thing is that

    Select Max (N) as From (SELECT Employee.EID, Count (DID) As N FROM Employee Inner Join Dependent On Employee.EID = Dependent.EID group by Employee.EID) N

    Works perfectly, but because it's a mission, I have to do in one step (no substeps/views)

    Any help?

    Thank you very much

    Hello

    ac981e5d-D10A-4520-BF42-23a894d04fb7 wrote:

    Ok. I'm taking your code in a view... I get this.

    and there is an orange underscore and a text of the error that says

    Select incoherent list in group by... change the group by clause of e.fname, e.lname, e.eid, count, max

    Which isn't what either the Oracle database would do.  Everything about orange (or any other color) sounds like it is caused by a front-end that could be interacting with Oracle.  In addition, the Oracle error messages always come with a 3-letter-5 code, as ORA-00933.

    under the selection internal (first medium)

    You have deleted the WITH clause.  The parser can recognize the error when it has reached the first left parenthesis.

    Create view AS A10T2

    (

    SELECT e.lname. ' ' || e.fname AS full_name

    e.eid

    (D.) AS this_group_count

    MAX (COUNT (d.)) ON (AS highest_group_count)

    E employee

    LEFT OUTER JOIN dependent d ON e.eid = d.eid

    GROUP BY e.lname, e.fname, e.eid

    )

    SELECT full_name

    eid

    Of aggregate_results

    WHERE this_group_count > = highest_group_count - 2

    ORDER BY full_name

    You need the WITH to define this clause means "AGGREGATE_RESULTS":

    Create view AS A10T2

    WITH aggregate_results AS

    (

    SELECT e.lname. ' ' || e.fname AS full_name

    ...

    Why do you have an ORDER BY clause in a view?   (It is probably not cause of your errors, just make the inefficient view)

    Command line error: column 5: 23

    Error report-

    SQL error: ORA-00933: SQL not correctly completed command

    00933 00000 - "not correctly completed SQL command.

    * Cause:

    * Action:

    This is another indication that some front is getting involved.  Looks like your front-end reports the exact Oracle error message, "0RA-00933" and then builing it's own error code, "00933. 00000 ", on this basis.  ORA-00933 is a reasonable mistake to wait if you omit the line ' WITH the aggregated results AS.  Once again, until I can actually run your code, I can't test it, and I can't run your code until you post CREATE TABLE and INSERT statements for some examples of data, or change the problem to use commonly available tables, such as those in the scott schema.

    and when I try my code

    CREATE VIEW A10T2 AS

    SELECT Employee.LName. ' ' || Employee.Fname as Full_Name, Employee.EID

    The left outer JOIN employee depends on Employee.EID = Dependent.EID

    Seen (Count (DID)) + 2 > (select Max (N) From (SELECT Employee.EID, Count (DID) As "N" FROM Employee Inner Join Dependent On Employee.EID = Dependent.EID group by Employee.EID))

    Order of Employee.Lname, Employee.Fname

    I get

    Command line error: column 2: 8

    Error report-

    SQL error: ORA-00937: not a function of simple-group

    00937 00000 - 'not a single-group function.

    * Cause:

    * Action:

    Then the orange underscore even under my inner ("select employee. EID, Count (DID) as "N" ") says to change the Group of Employee.eid, Count (DID)

    I just don't understand why he tells me to group them by Count (DID)?

    Isn't that what you did in your original post, and I have explained in answer #2?  If you continue to repeat the same mistake, you can expect continue to get the same error.  Given that you have a code, you know causes an error, do you think really that what makes a vision will cause the error to disappear?

    The inner query works fine on its own...

    Right; It's the outer query where you are missing the GROUP BY clause.

  • Execute Immediate with DOF and TABLE() - error ORA-22905

    Hello

    I have a problem trying to use a user defined the Type of the Table in a statement Execute Immediate containing a CREATE TABLE statement.

    Is there no work around for this problem?

    The actual code for the SELECT * OF TABLE(:T) is dynamic and slow. That's why I try to avoid to create/fill the table in two steps (as does with MY_TABLE1). Also, in this case, I can't use SELECT * but must specify all the columns (amount variable and over 100 columns).

    CREATE TYPE MY_TABLE_TYPE AS TABLE OF VARCHAR2(30);
    /
    DECLARE
        MT MY_TABLE_TYPE;
    BEGIN
        SELECT * BULK COLLECT INTO MT FROM DUAL;
        -- Two steps
        EXECUTE IMMEDIATE 'CREATE TABLE MY_TABLE1 (A VARCHAR2(30))';
        EXECUTE IMMEDIATE 'INSERT INTO  MY_TABLE1    SELECT * FROM TABLE(:T)' USING MT; -- OK
        -- One step
        EXECUTE IMMEDIATE 'CREATE TABLE MY_TABLE2 AS SELECT * FROM TABLE(:T)' USING MT; -- ERROR ORA-22905   
    END;
    /
    

    byee

    Andrea

    In my view, the error message is incorrect or the less misleading. Bind variables cannot be used in DDL:

    SQL > declare
    2 number of v_var: = 99;
    3. start
    4 run immediately "' create the my_table2 in select table: double T" using v_var; "
    5 end;
    6.
    declare
    *
    ERROR on line 1:
    ORA-01027: bind variable not allowed for data definition operations
    ORA-06512: at line 4 level

    SQL >

    What you could do is use the package variable:

    SQL > CREATE OR REPLACE
    2 PACKAGE PKG1
    3 EAST
    4 MT MY_TABLE_TYPE;
    5 FUNCTION GET_MT
    6 RETURN MY_TABLE_TYPE;
    7 END;
    8.

    Package created.

    SQL > CREATE OR REPLACE
    PACKAGE 2 BODY PKG1
    3 EAST
    4 GET_MT FUNCTION
    5 RETURN MY_TABLE_TYPE
    6 EAST
    7. START
    8 RETURN MT;
    9 END;
    10 END;
    11.

    Package body created.

    SQL > DROP TABLE MY_TABLE1 PURGE
    2.

    Deleted table.

    SQL > DROP TABLE MY_TABLE2 PURGE
    2.
    DROP TABLE MY_TABLE2 PURGE
    *
    ERROR on line 1:
    ORA-00942: table or view does not exist

    SQL > START
    2. SELECT * BULK COLLECT INTO PKG1.MT FROM DUAL;
    3 - two steps
    4 RUN IMMEDIATELY "CREATE TABLE MY_TABLE1 (A VARCHAR2 (30))';"
    5 IMMEDIATELY EXECUTE "INSERT INTO MY_TABLE1 SELECT * FROM TABLE (PKG1." GET_MT)';
    6 - one step
    7 IMMEDIATE EXECUTION "CREATE TABLE MY_TABLE2 AS SELECT * FROM TABLE (PKG1." GET_MT)';
    8 END;
    9.

    PL/SQL procedure successfully completed.

    SQL > select * from my_table1;

    A
    ------------------------------
    X

    SQL > select * from my_table2;

    COLUMN_VALUE
    ------------------------------
    X

    SQL >

    SY.

  • "Is:java.sql.SQLException error: ORA-01555: snapshot too old: rollback segment number with the name ' ' too small '.

    Hello

    We conduct apply CM which is a failure with the Error: "declared:java.sql.SQLException: ORA-01555: snapshot too old: rollback segment number with the name '' too small'."

    Its in our unique the production instance. I checked on the return parameter. Here are the details.

    SQL > show Cancel parameter

    VALUE OF TYPE NAME

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

    _in_memory_undo Boolean TRUE

    _undo_debug_usage integer 2

    UNDO_MANAGEMENT string AUTO

    UNDO_RETENTION integer 40000

    undo_tablespace string APPS_UNDOTS1

    SQL > select max (maxquerylen) of v$ undostat;

    MAX (MAXQUERYLEN)

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

    637116

    Please suggest what needs to be done to go further.


    Kind regards

    Prabhat.

    Post edited by: 942633

    Hello

    ORA-02067: the rollback transaction or registration required

    As mentioned, you will need to look at the design of the code:

    Error: ORA 2067
    Text: rollback transaction or registration required
    -------------------------------------------------------------------------------
    Cause: A failure (typically a trigger or a stored procedure with several updates remotely) has occurred, such as the execution of all or nothing from a previous call to Oracle cannot be guaranteed.
    Action: return to a previous point of backup or restore the transaction and resubmit.

    ------

    ORA-01555 caused by the following SQL statement (SQL ID: 5y0q4u8r2hdy9, query term s = 637608, SCN: 0x0bcc.4ed82762):

    ------

    ACTUAL SIZE [MB] UNDO UNDO RETENTION [s] NECESSARY UNDO SIZE [MB]

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

    304849 40000 267232.292

    To better help you, please let us know:

    -What is the function of this program.

    -Did you recently parameter changes until you have this error.

    Please ensure that the validation controls are implemented correctly, the DBA team and development will work hand in hand.

    Thank you &

    Best regards

  • Import Journal GL ending with error: ORA-01653

    Hi all

    Today, in our production of the GL Journal, import program instance ends in error with the below error message

    Error in: gllcje
    Function return status: 0
    Function Err Message: Ins_prep of execution using the insbindda descriptor
    Number of service warning:-1
    *****************************************************
    sqlcaid: sqlabc: 0 sqlcode:-1653 sqlerrml: 70
    sqlerrmc:
    ORA-01653: unable to extend table GL.GL_JE_LINES to 4096 in tablespace
    sqlerrp: sqlerrd: 0 21151 0 0 0 538976288
    SQLWARN: sqltext:
    SHRD0044: Process end the database session and leave the...

    I checked GL_TBL and GL_IDX tablespaces, we have more than 30 GB of free space in this table space.

    Please advice on why it gives this error even if we have a free space in the tablespace.

    Thank you and best regards,
    Rakesh

    Rakesh,

    Have you tried to change the table storage?

    Note: 180588.1 - ORA-01653 problems: UNABLE to EXTEND TABLE %S.%S %S IN %S TABLESPACE
    https://metalink2.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=180588.1

    Kind regards
    Hussein

  • By clicking on the icon of debugging for a procedure or function survey error ORA-00904

    Hi all

    By clicking on the icon of debugging for a procedure or function throws the error ORA-00904.

    Developer SQL 4.1.0.19.07

    Java 1.8.0_40

    OS: Linux Mint 17.1

    Developer SQL 4.1.0.18.37 on the same machine works very well.

    Clues?

    Thank you!

    degger error.png

    It is indeed regressed as RDBMS to 10g have object_id all_procedures notice. Buggy.

  • Error ORA - 00604 DB creation with DBCA

    Hello

    I want to create an instance of database with MS Windows 8.1 64bits.

    So I installed the Standard Edition 12.1.0.1.16 database (12.1.0.1.0 and Patch16). Now, when I create an instance I get the error ORA-00604 in the script cloneDBCreation.sql to the command ' modify AL32UTF8 database character set INTERNAL_CONVERT '.»

    Has anyone an idea what is the problem?

    Thanks in advance.

    Kind regards

    Martin

    12.1.0.2 is only available under EA right now - see MOS Doc 1905806.1

Maybe you are looking for

  • does not display the iframe to a google spreadsheet

    I just noticed that in 22 FF on a computer 64-bit of Windows 7 do not display iframes that refer to google spreadsheet. I turned to hardware accel in FF nothing helps. The functions of the site correctly on Chrome, Opera and IE. Some users have repor

  • 10.10.5 OSX runs slowly. Can someone suggest a middle course 'housekeep' of the system?

    My iMAC G5 (Yosemite 10.10.5) seems to work very slowly, and I don't know the hard drive is filled with programs of foreign languages useless, etc, etc.   I tried to use the internal features of the Apple disk utility, but there has been no noticeabl

  • Search Enhancement Pack popup

    Search Enhancement Pack appears that I tried to remove it. Run msiexec /x {A853BEB2-B270-4645-AAAA-9D83C2233BD3} but nothing seems to work he told me he is not installed so nothing to delete.

  • Hide the navigation pane

    Hi, after I push a qml the navigation pane page, is there a way to hide the navigation bar? I have my own button to allow the user to go back. Is this possible?

  • BasicEditField DTMF. What filter to use?

    This is a quickie for the legends of the forum Filter which do you suggest me for a DTMF input field? Permit characters would be: a - z, 0-9, *, #. Anyone can find the right combination of flags of filter for something like that? Thank you!