SQl%rowcount problem

i have created a function, in pl/sql to check the diffrence betwenn 2 similar tables having same columns . if it has diffrence tha is if select query returns row then it shoul go in error log table but this is not happening could you solve my problem.
thanks in advance
CREATE OR REPLACE FUNCTION CAL_BETWEEN_TABLES(
source_name IN VARCHAR2,
target_name IN VARCHAR2)
RETURN number
IS
v_success CONSTANT NUMBER := 0;
v_failure CONSTANT NUMBER := -1;
V_SQL VARCHAR2(10000);
v_rows_processed NUMBER :=0;
p_err_modul error_logs.err_modul%TYPE := 'NULL';
p_err_function error_logs.err_function%TYPE := ' CAL_BETWEEN_TABLES';
p_err_type error_logs.err_type%TYPE := 'SN';
BEGIN
V_SQL:= 'SELECT * from '||source_name||' minus select * from '||target_name||'';
v_rows_processed:=sql%rowcount;
IF v_rows_processed>0
THEN
     p_err.insert_error(p_err_modul,
p_err_function,
p_err_type,
SQLCODE,
USER,
'Failed in the function CAL_BETWEEN_TABLES' ||
SQLERRM);
RETURN(v_failure);
--dbms_output.put_line('failure');
ELSE
RETURN(v_success);
--dbms_output.put_line('success');
END IF;
END CAL_BETWEEN_TABLES;

You are missing EXECUTE IMMEDIATE or it is cut and paste problem. also
Declare variable
v_row source_name%rowtype;
V_SQL:= 'SELECT * from '||source_name||' minus select * from '||target_name||'';
EXECUTE IMMEDIATE v_sql INTO v_row;
v_rows_processed:=sql%rowcount;
HTH

Similar Messages

  • SQL%ROWCOUNT problem in Oracle 9i

    We have migrated our application from 8i to 9i. There is a PL/SQL procedure which returns number of rows inserted in the table. In Oracle it was returning correct number of rows but when we have migrated same procedure on Oracle9i it is returning 0 (ZERO) number of records even though procedure inserts successfully more than 100,000 rows in the table. It is used as:
    tmpCount := SQL%ROWCOUNT;
    Is there any change on Oracle9i?

    From MetaLink
    The behaviour you are observing is due to bug 2286387. You can set event 10943 to level 4194304 in your init<SID>.ora to get the old Oracle 8i behaviour.
    NOTE : The new behaviour in which SQL% attributes are affected by commit and rollback will be the DEFAULT behaviour going forward (Oracle 10i) so it is recommended to change the code so that you check the SQL% attrubutes before a commit or rollback.
    The event 10943 will also be removed in the future releases.

  • PL/SQL Performance problem

    I am facing a performance problem with my current application (PL/SQL packaged procedure)
    My application takes data from 4 temporary tables, does a lot of validation and
    puts them into permanent tables.(updates if present else inserts)
    One of the temporary tables is parent table and can have 0 or more rows in
    the other tables.
    I have analyzed all my tables and indexes and checked all my SQLs
    They all seem to be using the indexes correctly.
    There are 1.6 million records combined in all 4 tables.
    I am using Oracle 8i.
    How do I determine what is causing the problem and which part is taking time.
    Please help.
    The skeleton of the code which we have written looks like this
    MAIN LOOP ( 255308 records)-- Parent temporary table
    -----lots of validation-----
    update permanent_table1
    if sql%rowcount = 0 then
    insert into permanent_table1
    Loop2 (0-5 records)-- child temporary table1
    -----lots of validation-----
    update permanent_table2
    if sql%rowcount = 0 then
    insert into permanent_table2
    end loop2
    Loop3 (0-5 records)-- child temporary table2
    -----lots of validation-----
    update permanent_table3
    if sql%rowcount = 0 then
    insert into permanent_table3
    end loop3
    Loop4 (0-5 records)-- child temporary table3
    -----lots of validation-----
    update permanent_table4
    if sql%rowcount = 0 then
    insert into permanent_table4
    end loop4
    -- COMMIT after every 3000 records
    END MAIN LOOP
    Thanks
    Ashwin N.

    Do this intead of ditching the PL/SQL.
    DECLARE
    TYPE NumTab IS TABLE OF NUMBER(4) INDEX BY BINARY_INTEGER;
    TYPE NameTab IS TABLE OF CHAR(15) INDEX BY BINARY_INTEGER;
    pnums NumTab;
    pnames NameTab;
    t1 NUMBER(5);
    t2 NUMBER(5);
    t3 NUMBER(5);
    BEGIN
    FOR j IN 1..5000 LOOP -- load index-by tables
    pnums(j) := j;
    pnames(j) := 'Part No. ' || TO_CHAR(j);
    END LOOP;
    t1 := dbms_utility.get_time;
    FOR i IN 1..5000 LOOP -- use FOR loop
    INSERT INTO parts VALUES (pnums(i), pnames(i));
    END LOOP;
    t2 := dbms_utility.get_time;
    FORALL i IN 1..5000 -- use FORALL statement
    INSERT INTO parts VALUES (pnums(i), pnames(i));
    get_time(t3);
    dbms_output.put_line('Execution Time (secs)');
    dbms_output.put_line('---------------------');
    dbms_output.put_line('FOR loop: ' || TO_CHAR(t2 - t1));
    dbms_output.put_line('FORALL: ' || TO_CHAR(t3 - t2));
    END;
    Try this link, http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm#23723

  • %ROWCOUNT problem

    Dear SQL Experts,
    I have below PL/SQL procedure to update a table, here I see %ROWCOUNT returning 0 rows in all cases and not displaying actual number of rows updated.
    When I run the update statement directly, it updates correct number of rows? Is there a limitation around %rowcount? How to overcome this problem?
    Edited by: Ora DBA on Dec 11, 2012 12:49 AM

    Hi All, am facing same problem with SQL%ROWCOUNT returning 0, as well another issue with SELECT.
    SET serveroutput on;
    DECLARE
       TYPE date_array IS TABLE OF VARCHAR2 (12);
       v_date             date_array;
       v_cnt_before_upd   PLS_INTEGER;
       v_cnt_after_upd    PLS_INTEGER;
       PROCEDURE update_table_desc (ip_char IN CHAR)
       IS
          v_desc_from   VARCHAR2 (30);
          v_desc_to     VARCHAR2 (30);
       BEGIN
          IF ip_char = 'C'
          THEN
             v_desc_from := 'From Desc 1';
             v_desc_to := 'To Desc 1';
          ELSIF ip_char = 'S'
          THEN
             v_desc_from := 'From Desc 2';
             v_desc_to := 'To Desc 2';
          END IF;
          SELECT COUNT (*)
            INTO v_cnt_before_upd
            FROM table1
           WHERE col1_desc = v_desc_from;
          UPDATE table1
             SET col1_desc = v_desc_to
           WHERE col1_desc = v_desc_from;
          DBMS_OUTPUT.put_line ('sql%rowcount:..... ' || SQL%ROWCOUNT);
          SELECT COUNT (*)
            INTO v_cnt_after_upd
            FROM table1
           WHERE col1_desc = v_desc_to;
          DBMS_OUTPUT.put_line (   'To be updated: '
                                || v_cnt_before_upd
                                || '......Updated: '
                                || v_cnt_after_upd
          IF v_cnt_after_upd = v_cnt_before_upd
          THEN
             DBMS_OUTPUT.put_line (   v_desc_from
                                   || ' updated successfully to '
                                   || v_desc_to
             COMMIT;
          ELSE
             DBMS_OUTPUT.put_line (v_desc_from || ' update failed');
             ROLLBACK;
          END IF;
       EXCEPTION
          WHEN OTHERS
          THEN
             RAISE;
       END;
    BEGIN
       SELECT reporting_date
       BULK COLLECT INTO v_date
         FROM table2
        WHERE TRUNC (reporting_date) >= '31-Mar-2011'
          AND TRUNC (reporting_date) <= TRUNC (SYSDATE);
       FOR i IN v_date.FIRST .. v_date.LAST
       LOOP
          pack_context.context_open (v_date (i));
          DBMS_OUTPUT.put_line ('..............');
          DBMS_OUTPUT.put_line ('Context: ' || v_date (i));
          update_table_desc ('C');
          update_table_desc ('S');
          pack_context.context_disable;
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line (DBMS_UTILITY.format_error_stack ());
    END;
    OUTPUT:
    ..............          (LOOP 1)
    Context: 26-OCT-12
    sql%rowcount:..... 0
    To be updated: 0......Updated: 573
    From Desc 1 update failed
    sql%rowcount:..... 0
    To be updated: 0......Updated: 127
    From Desc 2 update failed
    ..............          (LOOP 2)
    Context: 02-NOV-12
    sql%rowcount:..... 0
    To be updated: 0......Updated: 573
    From Desc 1 update failed
    sql%rowcount:..... 0
    To be updated: 0......Updated: 127
    From Desc 2 update failed
    ..............          (LOOP 3)
    Context: 31-AUG-12
    sql%rowcount:..... 0
    To be updated: 571......Updated: 573
    From Desc 1 update failed
    sql%rowcount:..... 0
    To be updated: 127......Updated: 127
    From Desc 2 updated successfully to To Desc 2
    PL/SQL procedure successfully completed.As you can see, SQL%ROWCOUNT returns 0 even when there is an update in (LOOP 3).
    Also note the counts returned before and after update. They're different in LOOP 3. But
    when I run the update stmt alone, am getting only the 571 records updated which is what
    available there. Don't understand from where the select stmt get 573 from. Please help me
    understand the possibilities of getting wrong counts.
    FYI: I didnt faced this issue in Oracle 11.2.0.3, am facing it in 11.2.0.1

  • NEED HELP IN SQL HOMEWORK PROBLEMS

    I NEED HELP IN MY SQL HOMEWORK PROBLEMS....
    I CAN SEND IT VIA EMAIL ATTACHMENT IN MSWORD....

    Try this:
    SELECT SUBSTR( TN,
                   DECODE(LEVEL, 1, 1, INSTR(TN, '#', 1, LEVEL-1) + 1),
                   DECODE( INSTR(TN, '#', 1, LEVEL) , 0 ,
                           LENGTH(TN) + 1, INSTR(TN, '#', 1, LEVEL) )
                   - DECODE(LEVEL, 1, 1, INSTR(TN, '#', 1, LEVEL-1 ) + 1)
           ) xxx
    FROM (
        SELECT '234123#1254343#909823#908232#12345' TN FROM DUAL
    CONNECT BY LEVEL <= LENGTH(TN) - LENGTH(REPLACE(TN,'#')) + 1
    XXX                               
    234123                            
    1254343                           
    909823                            
    908232                            
    12345
    SELECT regexp_substr(tn, '[^#]+', 1, level) xx
    FROM (
        SELECT '234123#1254343#909823#908232#12345' TN FROM DUAL
    CONNECT BY LEVEL <= LENGTH(TN) - LENGTH(REPLACE(TN,'#')) + 1
    XX                                
    234123                            
    1254343                           
    909823                            
    908232                            
    12345 

  • SQL%Rowcount in Forms 9i

    How can I get number of rows which was REALLY updated in database?
    I want to use VPD with select allowed and update restricted policy, so when I update rows from SQL*Plus, I can see if no rows was updated, but when I update the same table from Forms, it says "Transaction complete 5 rows were updated". Requery shows that nothing was changed.
    I want to use something like SQL%RowCount in post-update trigger in forms. Any suggestions?

    Hi guys,
    You could create a Global variable or a Non base table item, from Post-Update keep incrementing the variable. At the end of the commit, you will have how many records were updated. But, keep in mind of resetting the variable back to Zero.
    This is the first thing which struck my mind, does anyone has good idea?
    Regards,
    Momen.

  • SQL injection problem

    hi
    How can we solve SQL injection problem in JDBC ?
    this means if we have a form with text field and the user must enter a number say 4 , instead he entered "4 or true" this will concatenated with the SQL query and return all records because of "or true"....
    is there any solutions ?
    i tried PreparedStatment and it words but not alwayes
    good luck

    i clearfied this in my first post
    if u didnt got what i mean u can google it
    http://www.google.com
    thanksYou didn't gently provide keywords, like I always do, so I cannot learn from you.
    Well, with a "reproduceable example" I mean that you have to post a short but complete working code snippet which reproduces the problem. So that we can copy'n'paste it in our environment here and test/debug it ourself and then eventually confirm the SQL injection.

  • How can I display SQL%ROWCOUNT in the "Process Success Message"

    Hi all;
    I am trying to display SQL%ROWCOUNT in the "Process Success Message" of a custom update Process.
    Any ideas?

    Chris,
    I assume,
    ORDER_ITEM_LOAD.MERGE_INTELLI_LABS ( in_DEPARTMENT_UID );
    is a package / procedure you call to do something. Change the procedure and add an
    out parameter to it, which will get the
    SQL%ROWCOUNT
    value. Then, call this package like this:
    DECLARE
      in_DEPARTMENT_UID NUMBER;
    BEGIN
      in_DEPARTMENT_UID := :P4_DEPARTMENT_UID;
      ORDER_ITEM_LOAD.MERGE_INTELLI_LABS ( in_DEPARTMENT_UID,  :P4_ROW_COUNT );
    END;Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Dyn sql execute immediate  A plsql block returning sql%rowcount of rows inserted

    I would like to get the number of rows inserted in a dynamic sql statement like following.
    execute immediate
    'begin insert into a(c1,c2,c3)
    (select ac1,ac2,ac3 from ac where ac1=:thekey
    UNION select tc1,tc2,tc3 from tc where tc1=:otherkey); end;' using in key1,in key2;
    I have tried per the oracle8i dyn sql chapter in doc RETURN sql%rowcount won't compile.
    also add this to statement 'returning sql%rowcount into :rowcount'
    no luck.
    any ideas.?
    thanks.

    Quick comment first - I'm not sure why you are even using dynamic SQL here. There is nothing dynamic about your statement. It is equivalent to just:
    insert into a (c1, c2, c3)
      select ac1, ac2, ac3
        from ac
       where ac1 = key1
      UNION
      select tc1, tc2, tc3
        from tc
       where tc1 = key2;Unless you are really dynamically changing a table or column name here and just didn't show it in your example, you certainly don't want the overhead of NDS for this insert in this situation.
    In any case, you just need to evaluate SQL%ROWCOUNT in the next statement.
    insert ...;
    if sql%rowcount = 0 then
      -- nothing was inserted
    end if;

  • Not Converted : Free-hand SQL connection problem

    While converting a Free Hand SQL report from Desktop Intelligence to Web Intelligence report in BI XI 3.1, I am faced with the problem
    Not Converted : <REPNAME> - Free-hand SQL connection problem
    It is be noted that there are some other Free Hand SQL Reports, that go converted and published without any error. The subject report has two Data Providers; one referring to the Universe and other from the Free Hand SQL tagged to a DB Connection

    Ajay,
    Some more points that can be of consideration to you to help understand my problems.
    The conversion from DeskI to WebI is in the same version BI XI 3.1 and not to BI 4.0 in which Free Hand SQLs is not supported.
    I have converted one other Free Hand SQL Report with an error "Partially Converted : <REPNAME2> - Conditional or permanent Hide Header not available in Web Intelligence", for which I had to edit the report in InfoView and un-tick the "Show When Empty" property of the table ( http://www.forumtopics.com/busobj/viewtopic.php?t=197157&view=next&sid=e6840aafa2d1267c66dae164d1dbf9db ). I think the solution mentioned in this link does not meet the purpose as the table is not displayed in the design time after the above untick.
    Coming back to our issue, further probing into this aspect I stumbled upon this link meant for RCT for BI 4.0 version
    https://csdwportal.dhhs.state.nc.us/downloads/Business%20Objects%20XI%20R4.0%20Docs/SAP%20BusinessObjects%20Report%20Con…
    where in Section 3.4.9, there is a mention of the limitation in conversion as under
    "Conversion of reports with free-hand SQL or stored procedures is only possible in Connected mode, since the Report Conversion Tool needs to use the secured connection to the database that is saved in the CMS."
    I want to how the secured connection to the database in REPNAME2 is different from the subject report REPNAME1 as REPNAME2 got partially converted. The error reported for Subject report is "Free Hand SQL Connection Problem" and not conversion problem which can occur after the connection is established.
    I did check the security properties of various FHSQL connections in the CMC and all of them are identical in nature.
    Please advise

  • Sqlcode and sql%rowcount as test conditions

    I am translating a procedure from Ingres to oracle. I use the Oracle sqlcode and sql%rowcount
    variables in place of Ingres's iierrornumber and iirowcount.
    I replaced the ingres names with the oracle names, and now am wondering how how oracle uses these
    values.
    I am using DBMS_OUTPUT.PUT_LINE to display the contents of sqlcode and sql%rowcount.
    What happens when I get "no rows selected". I run the same query in standalone command line
    and get no rows selected .. and it's correct because I don't have data that matches).
    But when I run it in the procedure, I don't get any values in sqlcode or sql%rowcount ... the
    program just exits. The author was using the ingres code to test if there was data there and then
    continue to do something else.
    If you get no rows returned, does that mean, the sqlcode is 0 ? and the sql%rowcount is emtpy?
    which is why my DBMS_OUTPUT.PUT_LINE doesn't display anything ?
    my example........
    before this section in the procedure ... after running a different select that returns data ...
    I am using the DBMS to debug the values I have going in ...
    DBMS_OUTPUT.Put_line ('BEFORE sqlcode is' || sqlcode);
    DBMS_OUTPUT.Put_line ('BEFORE sqlrowcount is' || sql%rowcount);
    Select value from table
    where condition ='Y'; > this select will product "no rows return" and ignore the 2 DBMS_OUTPUTS beow ---
    DBMS_OUTPUT.Put_line ('AFTER sqlcode is' || sqlcode);
    DBMS_OUTPUT.Put_line ('AFTER sqlrowcount is' || sql%rowcount);
    When i run the procedure... I get the DBMS BEFORE statements, and nothing afterwards ...
    BEFORE sqlcode is 0
    BEFORE sqlrowcount is 1 >>>> that is all that displays
    Since I am getting the "no rows returned" ... how does oracle handle it to anyone's experience ?
    Thank you. I am learning much from your comments and information.

    Thanks to your answers .... The procedure is below. I've had to hand type it in, so typos are my mistakes.
    The procedure compiles . When there is data to be found, I get the DBSM_OUTPUT lines of code ....
    msg_read is Y
    sql_error is 0
    row_count is 1
    p_vol_id is 880091
    When I enter in a file name that does not return ANY rows back I will get the msg_read
    DBMS_OUTPUT line
    msg_read is Y
    Call completed.
    It doesn't show any 0 for sqlcode or sql%rowcount
    The original author used the Ingres return codes as input to process the rest of the code...
    It seems like oracle bounces the procedure once there are no rows to be found.
    I just added this part ....
    having an exception in the clause shows that Oracle is bouncing it to the WHEN OTHERS
    exception ...
    Any ideas of how to get Oracle not to do this ?
    I am trying to keep things simple, and all I am testing for is if I get records back the code does things,
    if not, I do something else
    create or replace procedure userfile(vms_fil_name IN varchar2, msg_read IN Varchar2)
    authid current_user
    is
    p_vms_file_name varchar2(255);
    p_vol_id varchar2(255);
    p_orig_id varchar2(255);
    p_incoming_message varchar2(255);
    sql_error number;
    n_count number;
    begin
    p_vms_fil_nam :=vms_fil_nam;
    DBMS_OUTPUT.PUT_LINE ('msg read is '|| msg_read); >> verify incoming parameter
    IF (msg_read ='Y')
    then
    select vol_id,
    orig_id,
    incoming_message
    into p_vol_id,
    p_orig_id,
    p_incoming_message
    from
    table one_table a
    where
    a.vms_fil_nam = p.vms_fil_nam
    and incoming_msg ='I';
    n_count :='sql%rowcount';
    sql_error :='sqlcode;
    DBMS_OUTPUT.PUT_LINE ('row count is '|| n_count);
    DBMS_OUTPUT.PUT_LINE ('sql_error is '|| sql_error);
    DBMS_OUTPUT.PUT_LINE ('p_vol_id is '|| p_vol_id);
    end if;
    exception >>>> just added this part as the last test....
    when others
    DBMS_OUTPUT.PUT_LINE ('other condition has been met');
    end;
    call userfile ('GEORGE','Y');

  • SQL Command problem in Application Express 3.2.0.00.27

    To Oracle Application Express Development Team,
    Yesterday I installed Oracle Application Express 3.2.0.00.27.
    While doing my r&d, I came across one problem in SQL Command.
    For example I wanted to run sql "select * from tab"
    When I checked "Autocommit" checkbox it worked fine.
    But when I unchecked the "Autocommit" checkbox it gave me following error:
    ORA-01003: no statement parsed
    Please check post
    http://www.oraclebrains.com/2009/03/sql-command-problem-in-application-express-3200027/ for more details.
    Cheers

    I can't find the log file (a good indication that something went wrong)
    Here's the transcript of the session...
    SQL> startup upgrade
    ORACLE instance started.
    Total System Global Area 599785472 bytes
    Fixed Size 1288820 bytes
    Variable Size 264242572 bytes
    Database Buffers 331350016 bytes
    Redo Buffers 2904064 bytes
    Database mounted.
    Database opened.
    SQL> @apxpatch.sql
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    Wrote file apxset.sql
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    SQL>
    SQL> @apxldimg.sql
    PL/SQL procedure successfully completed.
    Enter value for 1: C:\Documents and Settings\jtench\Desktop\My Downloads\Oracle\apex_3.2.1
    old 1: create directory APEX_IMAGES as '&1/apex/images'
    new 1: create directory APEX_IMAGES as 'C:\Documents and Settings\jtench\Desktop\My Downloads\Oracle\apex_3.2.1/apex/images'
    Directory created.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    Commit complete.
    timing for: Load Images
    Elapsed: 00:03:30.03
    Directory dropped.
    SQL>

  • Replacement for SQL%ROWCOUNT

    Hi All,
    Please let me know whether there is any other function that does the function of SQL%ROWCOUNT, without the usage of packages or procedures.
    My intention is to get the count of the number of rows that got updated.
    Thanks,
    Vijayalakshmi

    Why can't you do it in an anonymous PL/SQL block then?
    Eg:SQL> create table test (col1 number);
    Table created.
    SQL> insert into test values (1);
    1 row created.
    SQL> insert into test values (2);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> declare
      2   v_row_count number;
      3  begin
      4   update test
      5   set    col1 = 3
      6   where  col1 != 3;
      7   v_row_count := SQL%ROWCOUNT;
      8   insert into test values (v_row_count);
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> select * from test;
          COL1
             3
             3
             2
    3 rows selected.

  • HANA equivalent of oracle's sql%rowcount to get affected rows.

    I want to get the number of rows affected from an insert or update statement inside a stored procedure.
    Is there any equivalent to oracle's sql%rowcount that can be called after the query.
    For example:
    create procedure procedure_name
    begin
         declare l_c integer;
         insert into table values ('somevalue');
         l_c := sql%rowcount; -- This would return 1 for the row inserted.
    end;

    Yes, after the INSERT statement....
    SELECT ::ROWCOUNT into L_C FROM DUMMY;
    Cheers,
    Rich Heilman

  • Sql%rowcount

    I have an insert-as-select in a loop. Does rowcount give the number of inserts into the table tab?
    Thanks, Ven.
    for i in 1 .. n
    loop
    insert into tab (a, b, c, d)
    select 123, x.b, 0, abc_id.seq.nextbal
    from class x, room y
    where x.id = y.id and x.id = i;
    end loop;
    no_of_inserts := sql%rowcount

    Hi,
    SQL%ROWCOUNT gives the number of rows, affected by the last DML statement. To calculate all rows:
    no_of_inserts := 0;
    for i in 1 .. n
    loop
      insert into tab (a, b, c, d)
        select 123, x.b, 0, abc_id.seq.nextbal
        from class x, room y
        where x.id = y.id and x.id = i;
      no_of_inserts := no_of_inserts + sql%rowcount;
    end loop;Assuming Class.Id is of INTEGER type, whole this loop can be replaced with the single statement:
      insert into tab (a, b, c, d)
        select 123, x.b, 0, abc_id.seq.nextbal
        from class x, room y
        where x.id = y.id and x.id BETWEEN 1 AND n;
      no_of_inserts := sql%rowcount;Regards,
    Dima

Maybe you are looking for

  • ICloud and multiple iTunes accounts

    Not sure where I should ask this question but how will I be able to keep choices in music, apps and pictures separate on each device?  Right now, my wife has a separate iTuns account for her stuff I have a separate account for my stuff.  She has an i

  • Video iChat for Full Screen presentation in dual-display mode

    I plan on giving a presentation and want to use video iChat with a special effects background projected using dual display mode. I find that if I use video preview in iChat, that I can't enter full screen mode (this would look best when projected). I

  • Is it possible to use Airplay on AppleTV without a TV?

    Hi everyone, I had an apple airport and was able to play pandora through it just using my iphone 4s and stereo system (an old boombox that takes a regular 3.5 mm plug). I got rid of my Airport and got an AppleTV under the impression I could use the a

  • Recommended throughput for Oracle data warehouse

    Hi, I know up front this is going to be a vague question...but I'm trying to determine approximate I/O bandwidth for a data mart server. Right now we're hosting 3 or 4 different marts on it, but that number is going to increase. Oracle's DW "2 day" c

  • RE: (forte-users) Killing the Nones - solved

    Thanks to all of you who helped ... this pex file works great. Allan -----Original Message----- From: kelsey.petrychynsasktel.sk.ca [SMTP:kelsey.petrychynsasktel.sk.ca] Sent: Thursday, August 24, 2000 9:51 AM To: Pomeroy, Allan Cc: kamranaminyahoo.co