Type of collection SQL % BULK_ROWCOUNT

Hello

My goal is to create a procedure that takes as a SQL parameter % BULK_ROWCOUNT and count the number of rows inserted.

PROCEDURE count_rows (IN rows_in?)

AS

l_counter NUMBER: = 0;

BEGIN

FOR indx IN rows_in. FIRST... rows_in. LAST LOOP

l_counter: = l_counter + rows_in (indx)

END LOOP;

DBMS_OUTPUT. Put_line (l_counter);

END;

Someone knows what to put instead of?.

Thank you!

34MCA2K2 wrote:

It is after all an array of positive integers. You can create a nested table as below & use it.

No, you can't. Two types of PL/SQL associative array are not same types even thogh they have identical definitions:

SQL > declare
2 type type1 is table of the index by pls_integer pls_integer;
3 type type2 is table of the index by pls_integer pls_integer;
4 v_type1 type1;
5 v_type2 type2.
6 start
7 v_type2: = v_type1;
8 end;
9.
v_type2: = v_type1;
*
ERROR on line 7:
ORA-06550: line 7, column 16:
PLS-00382: expression is of the wrong type
ORA-06550: line 7, column 5:
PL/SQL: Statement ignored

SQL >

So, without knowing the name of type SQL % BULK_ROWCOUNT, we can create procedure. And since Oracle tells us not type name, this cannot be done. Well, technically, it can, but it is better to the purpose:

SQL > CREATE OR REPLACE
2 PROCEDURE count_rows (rows_in IN sys. OdciNumberList)
3 AS
4 l_counter NUMBER: = 0;
5 BEGIN
6 FOR indx IN rows_in. FIRST... rows_in. LAST LOOP
7 l_counter: = l_counter + rows_in (indx);
8 END OF LOOP;
9 DBMS_OUTPUT. Put_line (l_counter);
10 END;
11.

Created procedure.

SQL > DECLARE
2 TYPE NumList IS TABLE OF NUMBER;
3 depts NumList: = NumList (30, 50, 60);
4 v_counts sys. OdciNumberList: = sys. OdciNumberList();
5 BEGIN
FORALL j IN FIU FIRST 6... FIU LAST
7 REMOVE from emp_temp WHERE department_id = depts (j);
8 BECAUSE I IN the FIRST ministries... FIU LAST LOOP
9 v_counts.extend;
10 v_counts (i): = SQL % BULK_ROWCOUNT (i);
11 END OF LOOP;
12 count_rows (v_counts);
13 END;
14.
56

PL/SQL procedure successfully completed.

SQL >

SY.

Tags: Database

Similar Questions

  • Single-column-multi-Rows, columns by using Types of Collection

    Can you guys help me get the result after using types of collection or all the predefined collections?

    In fact, I'm trying to compare the results of the columns col1 and col2 against a single value, so try to get the output in a single column.

    Required output should be like

    SQL > with t as (1 select col1, col2 2 double)

    2 Select * from t;

    COL

    ----------

    1

    2

    Please suggest any solutions using regexp/connect by / or etc.

    Well, then:

    SQL> with t as (select 1 col1, 2 col2 from dual)
      2  select nt.column_value
      3  from t
      4     , table(sys.odcinumberlist(col1, col2)) nt
      5  ;
    
    COLUMN_VALUE
    ------------
               1
               2
    

    but it is overkill IMO.

  • Can you record for an object of TYPE input COLLECTION and use it as a table?

    My PL/SQL stored procedure creates a list of employee number and phone record numbers. I don't want to store them in a table. I will pass this list from one procedure to another in my package.

    I created the type (folder) and type of collection (table) using this statement.
    CREATE TYPE obj_emp_phone_rec AS OBJECT
      (
         emp_number   NUMBER,
         emp_phone    VARCHAR2(100)
      )
    /
    
    CREATE TYPE obj_emp_phone_recs_table AS TABLE OF obj_emp_phone_rec
    /
    Thing is, can I use the obj_emp_phone_recs_table 'table type' as an array?

    I.e. can I insert records that in the procedure of package and pass reference to him in called secondary procedures.

    that is something like that
    PACKAGE BODY abc IS
    
      PROCEDURE kdkddk IS
      BEGIN
        -- Insert records to the  obj_emp_phone_recs_table 
        obj_emp_phone_recs_table(1).emp_number := '1';
        obj_emp_phone_recs_table(1).emp_phone   := '0774949494';
    
        obj_emp_phone_recs_table(2).emp_number := '234';
        obj_emp_phone_recs_table(2).emp_phone   := '285494';
    
        -- Pass the table to the sub procedure
        xyx(obj_emp_phone_recs_table);
    
        ........
        ......    
       
      END kdkddk;
    
    END abc;
    If yes how to insert the obj_emp_phone_recs_table?

    Nothing on the net. In the Net I found only where u set normal column of a table as an object type and then insert records him.

    Any help would be greatly appreciated.

    Published by: user12240205 on October 6, 2011 02:08
    mhouri > drop type obj_emp_phone_recs_table;
    
    Type dropped.
    
    mhouri > drop type obj_emp_phone_rec ;
    
    Type dropped.
    
    mhouri > CREATE TYPE obj_emp_phone_rec AS OBJECT
      2    (
      3       emp_number   NUMBER,
      4       emp_phone    VARCHAR2(100)
      5    )
      6  /
    
    Type created.
    
    mhouri > CREATE TYPE obj_emp_phone_recs_table AS TABLE OF obj_emp_phone_rec
      2  /
    
    Type created.
    
    mhouri > create or replace procedure p1(pin_tab IN obj_emp_phone_recs_table)
      2  is
      3   begin
      4     for j in 1..pin_tab.count
      5     loop
      6      dbms_output.put_line('record number '||j ||'-- emp number --'||pin_tab(j).emp_number);
      7     end loop;
      8
      9  end p1;
     10  /
    
    Procedure created.
    
    mhouri > create or replace procedure p2
      2  is
      3  lin_tab  obj_emp_phone_recs_table := obj_emp_phone_recs_table();
      4  begin
      5  FOR i IN 1 .. 5
      6     LOOP
      7        lin_tab.extend;
      8        lin_tab(i) := obj_emp_phone_rec(i, 'i-i-i');
      9     END LOOP;
     10
     11    p1(lin_tab);
     12
     13  end p2;
     14  /
    
    Procedure created.
    
    mhouri > set serveroutput on
    mhouri > exec p2
    record number 1-- emp number -- 1
    record number 2-- emp number --2
    record number 3-- emp number --3
    record number 4-- emp number --4
    record number 5-- emp number --5                                                                                                                                                                                                                          
    
    PL/SQL procedure successfully completed.
    

    Best regards

    Mohamed Houri

  • Cannot save the types of collection with the correct data type (structure type)

    Hi all!

    I am beginner in using the Data Modeler (SQL Develeoper Version 3.0.04 build HAND - 04.34)

    I tried to define types of structured data type type collection.

    for example
    Types of structure: StruA (for example, Integer, Float) and StruB (e. g. whole, Timestamp, Double, Double)
    Types of collections: TabA should collect the types of StruA and TabB should collect the types of StruB.

    create or replace TYPE TabA IS TABLE OF StruA;
    create or replace TYPE TabB IS TABLE OF StruB;

    It is possible to select the correct data type in the 'Collection Type properties' dialog box.

    The data type is installed to unknown after the registration and the reopening of the design. I see that the correct type has been entered in the xml file associated with the type of collection:
    < dataTypeDescr class = "oracle.dbtools.crest.model.design.datatypes.CollectionType$ DataTypeWrapper" >
    65677BBB-FB68-963C-552D-3F98E528520B < type > < / type >
    false < isreference > < / isreference >
    < / dataTypeDescr >

    File name of the structured type is 65677BBB-FB68-963C-552D-3F98E528520B.xml

    On the display of the design or generation DDL lose again this information.
    Is - this poor handling or a bug in the Data Modeler?
    Can anyone help? THX
    Gabor

    Edited by: user9529349 the 26.09.2011 07:49

    Hey Gabor,

    I'm afraid that this is a bug. This problem was reported earlier in this forum, loss of definition of type of data from one type of collection

    Thank you
    David

  • Unable to identify the type of collection

    Hi gurus

    I wonder if someone confirm the following type of collection. Article author return as nested table collection type, but it looks like associative array due to the INDEX OF PLS_INTEGER collection type.

    I appreciate if someone clear my point.

    Collection

    TYPE employee_ids_t IS TABLE OF THE employees.employee_id%TYPE

    INDEX BY PLS_INTEGER;

    l_employee_ids employee_ids_t;

    l_eligible_ids employee_ids_t;

    Concerning

    Shu

    but it looks like associative array due to the INDEX OF PLS_INTEGER collection type.

    That is right. This is an associative array.

  • Bulk collect / forall type what collection?

    Hi I am trying to speed up the query below using bulk collect / forall:

    SELECT h.cust_order_no AS custord, l.shipment_set AS Tess
    Info.tlp_out_messaging_hdr h, info.tlp_out_messaging_lin l
    WHERE h.message_id = l.message_id
    AND h.contract = '12384'
    AND l.shipment_set IS NOT NULL
    AND h.cust_order_no IS NOT NULL
    H.cust_order_no GROUP, l.shipment_set

    I would like to get the 2 selected fields above in a new table as quickly as possible, but I'm pretty new to Oracle and I find it hard to sort out the best way to do it. The query below is not working (no doubt there are many issues), but I hope that's sufficiently developed, shows the sort of thing, I am trying to achieve:

    DECLARE
    TYPE xcustord IS TABLE OF THE info.tlp_out_messaging_hdr.cust_order_no%TYPE;
    TYPE xsset IS TABLE OF THE info.tlp_out_messaging_lin.shipment_set%TYPE;
    TYPE xarray IS the TABLE OF tp_a1_tab % rowtype INDEX DIRECTORY.
    v_xarray xarray;
    v_xcustord xcustord;
    v_xsset xsset;
    CUR CURSOR IS
    SELECT h.cust_order_no AS custord, l.shipment_set AS Tess
    Info.tlp_out_messaging_hdr h, info.tlp_out_messaging_lin l
    WHERE h.message_id = l.message_id
    AND h.contract = '1111'
    AND l.shipment_set IS NOT NULL
    AND h.cust_order_no IS NOT NULL;
    BEGIN
    Heart OPEN;
    LOOP
    News FETCH
    LOOSE COLLECTION v_xarray LIMIT 10000;
    WHEN v_xcustord EXIT. COUNT() = 0;
    FORALL I IN 1... v_xarray. COUNTY
    INSERT INTO TP_A1_TAB (cust_order_no, shipment_set)
    VALUES (v_xarray (i) .cust_order_no, v_xarray (i) .shipment_set);
    commit;
    END LOOP;
    CLOSE cur;
    END;

    I'm running on Oracle 9i release 2.

    Short-term solution may be to a world point of view. Pay once per hour for the slow and complex query execution. Materialize the results in a table (with clues in support of queries on the materialized view).

    Good solution - analysis logic and SQL, determine what he does, how he does it and then figure out how this can be improved.

    Ripping separate cursors in SQL and PL/SQL code injection to stick together, are a great way to make performance even worse.

  • UNION operator with BULK COLLECT for one type of collection

    Hi all

    I created a table as given below:
    create or replace type coltest is table of number;

    Here are 3 blocks PL/SQL that populate the data in variables of the above mentioned type of table:


    BLOCK 1:

    DECLARE
    col1 coltest: = coltest (1, 2, 3, 4, 5, 11);
    col2 coltest: = coltest (6, 7, 8, 9, 10);
    COL3 coltest: = coltest();

    BEGIN

    SELECT * BULK COLLECT
    IN col1
    FROM (SELECT *)
    TABLE (CAST (coltest AS col1))
    UNION ALL
    SELECT * FROM TABLE (CAST (col2 AS coltest)));

    dbms_output.put_line ('col1');
    dbms_output.put_line ('col1.count: ' | col1.) (COUNT);

    BECAUSE me in 1... col1. COUNTY
    LOOP
    dbms_output.put_line (col1 (i));
    END LOOP;

    END;

    OUTPUT:
    col1
    col1. Count: 5
    6
    7
    8
    9
    10



    BLOCK 2:

    DECLARE
    col1 coltest: = coltest (1, 2, 3, 4, 5, 11);
    col2 coltest: = coltest (6, 7, 8, 9, 10);
    COL3 coltest: = coltest();

    BEGIN
    SELECT * BULK COLLECT
    IN col2
    FROM (SELECT *)
    TABLE (CAST (coltest AS col1))
    UNION ALL
    SELECT * FROM TABLE (CAST (col2 AS coltest)));

    dbms_output.put_line ('col2');
    dbms_output.put_line ('col2.count: ' | col2.) (COUNT);

    BECAUSE me in 1... col2. COUNTY
    LOOP
    dbms_output.put_line (col2 (i));
    END LOOP;
    END;

    OUTPUT:
    col2
    col2. Count: 6
    1
    2
    3
    4
    5
    11

    BLOCK 3:

    DECLARE
    col1 coltest: = coltest (1, 2, 3, 4, 5, 11);
    col2 coltest: = coltest (6, 7, 8, 9, 10);
    COL3 coltest: = coltest();

    BEGIN

    SELECT * BULK COLLECT
    IN col3
    FROM (SELECT *)
    TABLE (CAST (coltest AS col1))
    UNION ALL
    SELECT * FROM TABLE (CAST (col2 AS coltest)));

    dbms_output.put_line ('col3');
    dbms_output.put_line ('col3.count: ' | col3.) (COUNT);

    BECAUSE me in 1... Col3. COUNTY
    LOOP
    dbms_output.put_line (COL3 (i));
    END LOOP;
    END;


    OUTPUT:

    COL3
    Col3.Count: 11
    1
    2
    3
    4
    5
    11
    6
    7
    8
    9
    10

    Can someone explain please the output of the BLOCK 1 and 2? Why not in bulk collect in col1 and col2 11 return as County?

    If I remember correctly, the part INTO the query to initialize the collection in which it will collect the data, and you gather in the collections that you are querying, you end up deleting the data out of this collection until she is interrogated.

    Not really, wise trying to collect data in a collection that you are querying.

  • Send String [] [] type of pl/sql function in App.module procedure

    Hello
    I use jdveloper 11.1.1.3.0

    I have a pl/sql procedure. entry type argument is array (TAR) 2 Dimensions:

    types:
    create or replace TYPE ARRAYWEB in the varray (160) of VARCHAR2 (200);
    create or replace TYPE TAR as the ARRAYWEB table;

    Procedure:
    PROCEDURE of translations (info in TAR)

    I want to send the String [] [] type to this procedure from a function in the Application module:

    1: string [] [] str;

    2: CallableStatement plsqlBlock = null;

    3: string declaration = "BEGIN testi(:1); END; « ;

    4: plsqlBlock is getDBTransaction () .createCallableStatement (statement, 0);.

    5: plsqlBlock.setArray (1, str); Get the error

    6: plsqlBlock.executeUpdate ();

    but in line 5 I do not know what type should I use and this type (Array) does not work

    Habib

    Maybe this can help: http://www.devx.com/tips/Tip/22034

    Dario

  • What types of instructions SQL BI Publisher DO does support?

    Hello

    The following T - SQL script works OK on MS - SQL Server 2005, but is rejected by BI Publisher (10g)

    Yes, this may seem strange: this code actually precedes the actual query select, while she prepares a few temporary tables for her.
    I need this to check conditions... (it's for reporting Primavera 8.1)

    The script runs without problem on SQL Management Studio Query Panel...
    But its setting in a datamodel "SQL Query" at RANDOM (10g), it returns an error: can not generate automatic layout (and cannot 'see')

    Could someone tell if the used instructions are (all) compatible with BI Publisher? (10g)
    It seems that there are some Beeping cannot parse. (see log error details)

    ------------------------start----------------------------
    Select * into #tmp_prj from pxrptuser.p6project
    Select * into #tmp_act from pxrptuser.p6activity
    ALTER TABLE NOCHECK CONSTRAINT #tmp_act ALL

    create the table #TMP_MILES (mname varchar (255))
    INSERT INTO #TMP_MILES (mname) values ('first string')
    INSERT INTO #TMP_MILES (mname) values ('second string')
    INSERT INTO #TMP_MILES (mname) values ("third string")
    INSERT INTO #TMP_MILES (mname) values ('fourth string")
    INSERT INTO #TMP_MILES (mname) values ('fifth string")
    INSERT INTO #TMP_MILES (mname) values ('sixth string")
    / * using the cursor * /.
    declare @cur_store varchar (255)
    Set @cur_store = "
    declare MonCursor CURSOR FAST_FORWARD for
    Select mname in #TMP_MILES
    OPEN MonCursor
    THEN EXTRACT MyCursor
    IN @cur_store
    WHILE @FETCH_STATUS = 0
    BEGIN

    DECLARE @LoopVar int
    SET @LoopVar = (SELECT MIN (objectid) OF #tmp_prj)
    Then @LoopVar is not null
    BEGIN
    otherwise there is (select P.objectid, A.projectobjectid from #tmp_prj P, #tmp_act A
    where P.objectid=@LoopVar and A.projectobjectid = P.objectid and A.name=@cur_store)
    insert into #tmp_act (objectid, projectobjectid, name, wbsobjectid, calendarobjectid, isnewfeedback, autocomputeactuals, percentcompletetype, type, durationtype, review status, status, id, islongestpath, RPT_CURRENT_FLAG, EndDate, baselinefinishdate)
    values (654654, @LoopVar, @cur_store, 654654, 654654, 'Y', 'Y', 'Delalande', 'fff', 'zzz', 'aaa', 'sss', 'xxx', 'n', 'F', NULL, NULL)
    -print @cur_store
    SET @LoopVar = (SELECT MIN (objectid) #tmp_prj TP WHERE @LoopVar < TP.objectid)
    END
    -Select P.id, P.objectid, B.SID, A.finishdate P, #tmp_act A #tmp_prj where (A.projectobjectid = P.objectid and A.name=@cur_store)
    THEN the EXTRACTION OF MonCursor
    IN @cur_store
    END

    CLOSE MonCursor
    DEALLOCATE MonCursor
    drop table #TMP_MILES

    / * This is the select query, use the tables 'tmp_': also works very well on the query from SQL Management Studio panel...*/

    drop table #tmp_prj
    drop table #tmp_act
    ------------------------------------end-------------------------------

    Here is the error log:

    french text only means: "the statement didn't return the result" (which is essentially...)
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxSTARTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    >
    [011812_101509915] [] [EXCEPTION] com.microsoft.sqlserver.jdbc.SQLServerException: the instruction did not return the result set*.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:392)
    to com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$ PrepStmtExecCmd.doExecute (SQLServerPreparedStatement.java:338)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:281)
    at oracle.apps.xdo.dataengine.XMLPGEN.getDefaultStructure (unknown Source)
    at oracle.apps.xdo.dataengine.DataProcessor.setDefaultTemplate (unknown Source)
    at oracle.apps.xdo.dataengine.DataProcessor.initTemplate (unknown Source)
    at oracle.apps.xdo.dataengine.DataProcessor.writeDefaultLayout (unknown Source)
    at oracle.apps.xdo.servlet.resources.ResourceServlet.createAutoLayout(ResourceServlet.java:288)
    at oracle.apps.xdo.servlet.resources.ResourceServlet.service(ResourceServlet.java:144)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:100)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)

    >
    # < 18 Jan. [2012 10: 15 THIS > < HTTP > < VXP > < AdminServerBIP1 > < error > < ExecuteThread [ASSET]: '2' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < WLS Kernel > > <><>< 1326878109915 > < BEA-101017 > < [path of the module: xmlpserver ServletContext@14316901[app:xmlpserver: / xmlpserver spec-version: 2.5]] Root cause of ServletException.
    Oracle.Xml.Parser.v2.XMLParseException: end tag does not match the start tag 'group '.
    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
    at oracle.xml.parser.v2.NonValidatingParser.parseEndTag(NonValidatingParser.java:1368)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1313)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:292)
    at oracle.apps.xdo.dataengine.DataProcessor.getSQLRTFLayout (unknown Source)
    at oracle.apps.xdo.dataengine.DataProcessor.writeDefaultLayout (unknown Source)
    at oracle.apps.xdo.servlet.resources.ResourceServlet.createAutoLayout(ResourceServlet.java:288)
    at oracle.apps.xdo.servlet.resources.ResourceServlet.service(ResourceServlet.java:144)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:100)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    >
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxERRORLOG ENDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    The script is running on SQL Server 2005. But there is an error on the NOSE.

    Your ideas and/or messages is much appreciated...!
    Thank you!

    Model data BEEP is expected at this only DML and DDL statements and your script is to combine the two.
    In addition even he accepts only and analysis queries DML ONE by data model.
    If you want several DML, then you must define several data models.

    If your entire script will never run at the BEEP.

    If you want to run the process before / after the report is run, then you can call datatrigger using data templates in the data model.
    Read here: http://docs.oracle.com/cd/E12844_01/doc/bip.1013/e12187/T421739T434255.htm#3503342

    concerning
    Jorge
    p.s. If your question has been answered then please mark my answer in the form * "Correct" * or * "useful."

  • Type of collection in PLSQL and Oracle

    Hi all

    I define a collection type in Oracle. When I try to use it in following PLSQL, I "PLSQL-00405: subquery not allowed in this context" error. How can I use the values that I have previously defined in the collection for this case?

    Thank you

    Mike



    CREATE or REPLACE the TYPE testCaseSet IS TABLE OF NUMBER;
    \




    CREATE OR REPLACE PACKAGE PK_test
    testCaseSet C_TEST_CASE: = testCaseSet (1,3,5,7,9);

    PROCEDURE showTestCase()
    IS
    BEGIN
    IF rec_testForm.testNbr IN
    (SELECT * from TABLE (C_TEST_CASE))
    THEN
    ...
    END IF;

    END showTestCase
    END PK_test

    It seems that the loop will be entered regradless of the value of v_tes_case_nbr

    And what is v_tes_case_nbr? A variable defined somewhere? In this case, try

    ...
    FOR c in (SELECT *FROM TABLE(C_Test_Set) WHERE TestText = 'Regression Test' AND TestNbr  = v_test_case_nbr AND ROWNUM = 1)
    LOOP
    .....
    END LOOP;
    ...
    
  • Type column (java.sql.SQLException) not valid

    On Jdeveloper 11.1.2 on Windows 7 64B

    I got this table:

    create the table entry
    (the number (32) of entry_id not null,)
    entry_class_id varchar2 (5) not null,
    VARCHAR2 (200) of notes not null,.
    VARCHAR2 (1) active by default not null, 'Y '.
    VARCHAR2 (1) of the interface by default ' is not null,.
    total_debit number (32.2) default null, 0
    total_credit number (32.2) default null, 0
    created_on date not null,
    created_by varchar2 (30) not null,
    voided_notes varchar2 (200) null,
    voided_on date null,
    voided_by varchar2 (30) null
    );

    Jdev map this table like this:

    EntryId BigInteger
    String EntryClassId
    Channel information
    String active
    Chain of Interface1
    TotalDebit BigDecimal
    TotalCredit BigDecimal
    CreatedOn Timestamp
    String CreatedBy
    String VoidedNotes
    VoidedOn Timestamp
    String VoidedBy

    Run ADF Model Tester I got the error (java.sql.SQLException) invalid column type. prompts to insert a line. I used instead of timestamp date by getting the same error. Any ideas?

    Thank you

    You can copy the complete stack trace? It works if you change BigInteger in full (recent fix, it was a bug with the JDBC driver)

  • Data types in pl/sql in bulk?

    Hi I would be offline if I ask this question, re [subject]?


    is it possible in pl/sql to run this.

    test procredure (' procedure_name', [param1,...] ");

    Sorry just new to pl/sql I'm looking for a consideration of php call_user_func_array.

    any thoughts would be greatly appreciated.

    I think the ANYDATA type is what you are looking for.

    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/t_anydat.htm

  • How to detect the SQL type to avoid SQL injection

    Hello

    I work in a company of gsm and we develop a program for analysis of trends. Users of this program can write SQL statements. I want to write sql statements specific as my program input statement (SELECT... from...). Instructions to SELECT most. I have dynamic SQL and PL/SQL blocks in my program. I get user-defined SQL statements and execute dynamic Sql code.

    Here's the problem: I need to understant what type of SQL, they give as my program input parameter to avoid wrong operations (DELETE, TRUNCATE, DROP...)

    First of all I thought to the RegExp to understant if a SELECT SQL or SQL DELETE...

    Is there a recommended on this problem? Oracle has any procedure to detect?

    Thank you

    Hi a_yavuz,

    We had to solve the same problem while we work a project that receives user sql statements, we check the sql as follows:

    lb_bool: = regexp_like (upper (pv_sql),'^ (-() * *(SELECT|))) (WITH)');

  • is there any type of compression sql network

    I have a user who is trying to be rolled up to a select statement that is located close to a text of 2 gig file when its done...
    the statement runs in 3 minutes when it is running on a sql client connected to a 1gig full duplex network...
    but when it is connected to a network of 100 Mbps half duplex it takes 7 hours...
    the obvious solution would be to upgrade the network of clients... but it of not my call... and will not happen...
    I offered to schedule his local and send the zip zip file it... but they don't want that...

    is there any type of compression setting that can be specified.

    I do not think that to be honest, but I've not paid through documentation. This can be beneficial however: [unit of configuration of Session data | http://download.oracle.com/docs/cd/B19306_01/network.102/b14212/performance.htm#sthref1395]

    HTH!

  • Type of Validation SQL "Exist" does not raise an error as expected

    Hello

    I'm doing a validation of the work. If no data is returned by the query on, triggers a validation error. Is there a SQL type of validation.

    Select 1
    OF sivoa.evv_ST25
    WHERE DATE1 COMES
    TO_DATE(:P3_DATE_DEBUT ||) '000000', ' DD/MM/YYYYHH24MISS') AND
    TO_DATE(:P3_DATE_DEBUT ||) "235959'," DD/MM/YYYYHH24MISS").

    Unfortunately, nothing happens (validation does not raise an error)

    I tried this:

    Select 1 double

    It does not work either! I mean that no error is raised. Where is my mistake?

    Thank you for your kind answers!

    Christian

    Why not change your validation for PL/SQL function returns BOOLEAN and to do this:

    DECLARE
    lv_ret NUMBER;
    BEGIN

    Select 1
    IN lv_ret
    OF sivoa.evv_ST25
    WHERE DATE1 COMES
    TO_DATE(:P3_DATE_DEBUT ||) '000000', ' DD/MM/YYYYHH24MISS') AND
    TO_DATE(:P3_DATE_DEBUT ||) "235959'," DD/MM/YYYYHH24MISS");

    RETURN TRUE;

    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    RETURN FALSE;

    WHILE OTHERS
    THEN
    LIFT;

    END;

    Hope that helps

    Duncan

    "You can reward this comment of points by clicking useful or correct.

Maybe you are looking for

  • Images of the characters and themes not appearing is not on getpersonas etc.

    When I try to view the site of personas.com , the images of the personas do not appear on the web page. (Is not the same problem you see is not my own character change to nine on rolling of the mouse - the form of preview doesn't work). The same thin

  • 10.2.2 FCPX - Radial blur?

    Final Cut Express had a Radial blur called video effect where you can adjust the angle and the steps of the blur. It seems that this version of the Radial blur area does not exist in Final Cut Pro X (10.2.2 worm Anyone know if there is a way to recre

  • Missing 3D stereoscopic NIVIDIA

    HI -. I just installed windows 7 and put to update to the latest version of the driver Nvidia 310.90... Everything seems fine, but the stereoscopic 3D option is missing in the NVIDIA Control Panel. I checked the folder NVIDIA Coporation/3D Vision and

  • XOR operation for Hex values

    Dear Sir. I must apply the Xor operation to 03, 01, 57 & values Hex C9. The Calculater programmer I listed as: '03 Xor 01 Xor 57 C9 Xor = 9 c ". Finally, the output is 9 c. How to implement the same operation LabVIEW? Kind regards Chick S

  • ASBL voice and data simultaneously

    Anyone know why we can not make a phone call and use data at the same time on the VZW network? I am able to do that with my 1st gen Moto X, so it seems just stupid my 2nd generation cannot do. I discovered this last week I was on the phone with my da