Optimizing a looping procedure - when to commit

Does anyone have a link to an article that explains when a commit should be timed to be optimal (ie: after X amount of statements or after insertion / updating of Y Mb)?
I have a procedure that loops through and inserts (ugly, but inherited and I have no time to re-code) and I'm not sure how to go about optimizing the commit point other than trial and error. Right now I'm commiting every 1000 interations of a loop, which is faster than 1 but slower than no commits, but how can I figure out what is the best?
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
With the Partitioning option
JServer Release 8.1.7.4.0 - Production
Lemme know if more info is needed.
Thanks,
Pete

Yes this is obvious each commit has a small amount of overhead, the more you do the more the overhead adds up.
So the most optimal approach available to you is commit once at the end.
If you have 27 million inserts this may not be possible due to resource issues. Do the tables have a lot of indexes? Try for a commit every 2 million, 1000 is rediculously tiny.
Try the query in this post to see how much undo you use before commiting after 1000, and then multiply up to see how much you can get away with.
Re: Suggestions for improving this update in batches of 100 records
But again, I have run tests before that show LOOP vs SQL is hundreds of times slower, while commiting after every row in the LOOP versus commiting once after the LOOP makes a difference of a few percent, so I do not think you are going to squeeze much of a runtime improvement just be reducing the commit frequency.

Similar Messages

  • What is the procedure when upgrading to Creative Suite 5 Production Premium?

    Hello!
    In 2006 I bought the Adobe Creative Suite Production Studio Premium. The procedure when activating the installation I don't remember exactly. The computer on which the Suite was installed doesn't have an internet connection (I thought that was the simplest and safest thing to do; I have another computer for that purpose).
    Now, if I want to upgrade to Creative Suite 5 on a newly bought i7 computer, what is the procedure? What do I need to prove to Adobe that I'm eligible for the upgrade? Please tell me the serial number on the box is enough... my old editing computer doesn't start at all so any info contained there is unobtainable at the moment.

    The serial number of the old version - is that, by any chance, something you get from Adobe via internet or is it stuck on the box with the manuals and DVDs?I can't remember myself.
    I kept the following (I don't even know if it is from Adobe) on my other (internet) computer. Someone recognizes this as specifically relating to Production Studio, when it comes to the serial number format for example? L is a letter and N is a number.
    Below are your Serial and Authorization keys.
    Enter them in the "Enter registration keys" window, which can be found at:
    "Help menu" -> "Enter registration keys".
    Serial-key: NNLL-LLLN-LLLL-LNLL  Auth-key: LLLN-NLNL-NLLN
    As I said, I can't access info on my old editing computer. Any help would be appreciated.

  • I created a book and tried to place order but failed.  I followed the procedures, when the book completed uploading, the message "An error occured uploading your order" pop up.  There was no error message all along when I created the book.

    I created a book and tried to place order but failed.  I followed the procedures, when the book completed uploading, the message "An error occured uploading  your order" appeard.  There was no error message all along when I created the book. I tried several time but failed.

    preview the order and try again - http://support.apple.com/kb/HT1040
    If it still does not work boot into Safe Mode, preview again and try
    With the number of reports in the last few days it may be server overload - if so trying during a time of lower activity might help
    LN

  • How to make main menu start at loop point when you link back to it?

    I have a main menu with a an intro, after the intro I have put a loop point.
    But when I link back to the main menu, it plays the whole intro.
    How do I let the main menu start at the loop point when I target a button back to it?

    Jake:
    English is not my native language (I used Wikipedia to understand RTFM !!!).
    I used to copy&paste some lines from the manuals when a post can be answered directly that way (why to write it again if it's well written there?).
    This is my "last upgrade": I uploaded some captured images from the manual to use easier in this kind of frequent questions. I like to show that the information was right there in the manual . . . but I really find the expression RTFM a little hard !
    ;D
      Alberto

  • Can we call the procedure which contain commit  in trigger

    can we call the procedure which contain commit in trigger

    Well, what i've noticed from op's past post - whenever op post - he/she posts multiple short questions here. This may be indication of some sort of assignment or any kind of online exam's ...... :?)
    Regards.
    Satyaki De.

  • How to stop info and start loop over when file not found.

    I have a program that I want to run in a loop as long as there are files in a certain dir. When all the files have been read they are moved to another dir. I want this program to have a continuous loop but when the "read characters from file.vi" is send a "Not a Path" I dont want to be prompted for a file because there can be no user interaction. When my program has read and anylized all the data, I want it to keep going in a loop so when more files are put in this dir it will read again.

    Hi,
    create a while loop and use the file/directory-info vi (file i/o ->
    advanced) to get the list of existing files. If files exist (case structure)
    iterate through every one by using a for loop. Now you can read all files
    and when finished move them into the new directory. After that you can
    analyze the whole data. At last leave the case to wait until the next files
    are stored in the directory. Cause you used the file/directory-info vi, you
    won't get the dialog!
    hope that will help
    Henrik
    Bobca schrieb in im Newsbeitrag:
    [email protected]..
    > I have a program that I want to run in a loop as long as there are
    > files in a certain dir. When all the files have been read they are
    > moved to another dir. I want t
    his program to have a continuous loop
    > but when the "read characters from file.vi" is send a "Not a Path" I
    > dont want to be prompted for a file because there can be no user
    > interaction. When my program has read and anylized all the data, I
    > want it to keep going in a loop so when more files are put in this dir
    > it will read again.

  • Call procedure when add item

    Hello,
    Is any way to call procedure when you add and item in oracle portal (not after)? Example when you add a item text and you see the form to add all content is any way to call a procedure in this form?
    Thanks
    Edited by: user533544 on 6/Abr/2009 2:12

    Hi Orlando -
    In the next major portal release this functionality will be available. We call it the Content Management Event Framework. This event framework lets you react on any event that happens in your portal CM system.
    In the current release, you can implement a workaround by using database triggers on the Content Management (CM) views/tables. The CM views are documented here: http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1012/wwsbr_api_view.html
    Hope this helps,
    Candace

  • I try to drag certain loops but when i drop them in i get the error:   Result code = -5000     File = GarageBand-Temp-B262E454.tmp

    I try to drag certain loops but when i drop them in i get the error: 
         Result code = -5000   
         File = GarageBand-Temp-B262E454.tmp

    Hi,
       I've been trying to solve this problem for a school my companey has set up. After some research and looking at a number of similar posts I tracked the problem down to loops that came with jam packs or with apps like soundtrack pro. These loops are located in /Library/audio/appleloops. If you give everyone read and write access to this folder and it items the loops seem to work.
    I also noticed that once the loops were working agin GB had to convert the sample rate so it's possible that it's the sample rate on certain loops that causess the issue or prehaps the need to change the rate.
    Hope this helps.
    Matt Fleming
    (ACSA)

  • How can I export a video that will loop indefinitely when played from a usb drive?

    how can I export a video that will loop indefinitely when played from a usb drive?

    As far as I know, PPro does not have that capability
    If you were creating a DVD in Encore, you could put an "end action" on the video timeline to itself... so at the end of the DVD video it would go back to the beginning
    I am not aware of any way to do that for a simple file

  • I just upated to IOS 6 and I cannot find the loop option when I play music

    I just upated to IOS 6 and I cannot find the loop option when I play music.  Does anyone know where I can turn off loop?

    The problem is with facebook, go to settings / facebook / your user name and delete your account, the do a hard reset (home+power for some seconds).
    dont need to delete the facebook app! just delete your integrate account from settings
    cheers!

  • I noticed that any other code in my while loop only gets called at the 1st time through the loop and when a event is executed.

    HI there!
    I have a while loop, in which i am reading from/writing  to a compact rio. Furthermore, i added a event structure, its the 1st time i'm using it so i'm a bit lost at times.
    I have the event structure set up for all my button i want to trigger an event. However, i have some other code which i would also like to be executed, evebn though no event has been executed.
    I noticed that the other stuff in the loop only gets executed the 1st time through the loop and when an event is triggered.
    My question therefore is, how do i get the other stuff to execute as well?
    Please advise.
    Thanks.
    Regards,

    Put the other code in the timeout event case.  Wire some positive value to the timeout hourglass input.  That code will execute everytime a timeout occurs.  For instance, if you wire 100 into the timeout, the code in that case will execute every 100 mSec.
    - tbob
    Inventor of the WORM Global

  • Running procedure when pressing interactive search button

    Hi there,
    I'd like to run a procedure when submitting a search.
    So when the user klicks on the search button, first my procedure should run, then the search should be executed.
    How can I handle this? I cannot put the procedure to 'run on button condition' as the search button is not shown in this list.
    Any advice is appreciated!
    BR
    & thank you,
    Lena

    Hi,
    Try to use a Workbook.BeforeClose Event (Excel), this event will occurs before the workbook closes. If the workbook has been changed, this event occurs before the user is asked to save changes:
    http://msdn.microsoft.com/en-us/library/office/ff194765(v=office.15).aspx
    For VBA related questions, better to post your question to the forum for
    Visual Basic for Applications (VBA):
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=isvvba
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Thanks,
    Ethan Hua CHN
    TechNet Community Support

  • How to make pl/sql procedure not auto-commit?

    I wish to be able to execute a create statement, and then rollback if there is a problem with any sql that follows. It seems that you cannot rollback? Why is this?
    (My problem is that I wish to execute a series of sql statements and run a rollback if anything before it fails, including the creation of the table)
    set serveroutput on;
    declare
      rcount INTEGER;
    PRAGMA AUTONOMOUS_TRANSACTION;
    begin
      execute immediate 'create table bsdconv_s1stc_code (id number)';
      dbms_output.put_line('Table created successfully');
      rollback;
    exception
      when others then dbms_output.put_line('Error while creating table. Probably already exists.');
    end;

    Ni hao, Dong Yage!
    I think using procedure and handling on call you might be able to do it.
    SQL> create table test (i int);
    Table created.
    SQL> insert into test values (1);
    1 row created.
    SQL> select * from test;
             I
             1
    SQL> set serveroutput on;
    SQL> declare
      2    rcount INTEGER;
      3  PRAGMA AUTONOMOUS_TRANSACTION;
      4  begin
      5    execute immediate 'create table bsdconv_s1stc_code (id number)';
      6    dbms_output.put_line('Table created successfully');
      7  --  rollback;
      8  exception
      9    when others then
    10       dbms_output.put_line('Error while creating table. Probably already exists.');
    11    rollback;
    12  end;
    13  /
    Table created successfully
    PL/SQL procedure successfully completed.
    SQL> desc bsdconv_s1stc_code
    Name                                      Null?    Type
    ID                                                 NUMBER
    SQL> select * from test;
             I
             1
    SQL> insert into test values (2);
    1 row created.
    SQL> set serveroutput on;
    SQL> declare
      2    rcount INTEGER;
      3  PRAGMA AUTONOMOUS_TRANSACTION;
      4  begin
      5    execute immediate 'create table bsdconv_s1stc_code (id number)';
      6    dbms_output.put_line('Table created successfully');
      7  --  rollback;
      8  exception
      9    when others then
    10       dbms_output.put_line('Error while creating table. Probably already exists.');
    11       rollback;
    12       execute immediate 'drop table bsdconv_s1stc_code';
    13  end;
    14  /
    Error while creating table. Probably already exists.
    PL/SQL procedure successfully completed.
    SQL> select * from test;
             I
             1
             2
    SQL> rollback;
    Rollback complete.
    SQL> select * from test;
    no rows selected
    SQL> desc bsdconv_s1stc_code;
    ERROR:
    ORA-04043: object bsdconv_s1stc_code does not exist
    On executing PL/SQL block secondly,
    it raises exception, displays error messages and drops table
    but main transaction is not rolled back.
    This is because rollback belongs to only inseide of
    AUTONOMOUS_TRANSACTION PL/SQL block.
    Now, let us try using procedure.
    SQL> grant create table to ushi;
    SQL> create or replace
      2  procedure create_table
      3  is
      4   PRAGMA AUTONOMOUS_TRANSACTION;
      5   begin
      6     execute immediate 'create table bsdconv_s1stc_code (id number)';
      7     dbms_output.put_line('Table created successfully');
      8  exception
      9    when others then
    10       dbms_output.put_line('Error while creating table. Probably already exists.');
    11       execute immediate 'drop table bsdconv_s1stc_code';
    12       raise;
    13  end;
    14  /
    Procedure created.
    SQL> select * from test;
    no rows selected
    SQL> begin
      2    insert into test values (1);
      3    create_table;
      4  exception
      5    when others then
      6      dbms_output.put_line('Error on Creating table or Transaction');
      7      rollback;
      8  end;
      9  /
    Table created successfully
    PL/SQL procedure successfully completed.
    SQL> select * from test;
             I
             1
    SQL> commit;
    Commit complete.
    SQL> desc bsdconv_s1stc_code
    Name                                      Null?    Type
    ID                                                 NUMBER
    SQL> begin
      2    insert into test values (2);
      3    create_table;
      4  exception
      5    when others then
      6      dbms_output.put_line('Error on Creating table or Transaction');
      7      rollback;
      8  end;
      9  /
    Error while creating table. Probably already exists.
    Error on Creating table or Transaction
    PL/SQL procedure successfully completed.
    SQL> select * from test;
             I
             1
    SQL> desc bsdconv_s1stc_code
    ERROR:
    ORA-04043: object bsdconv_s1stc_code does not exist

  • Loop drops when connected wireless (NI 9191)

    Hi,
    I cannot figure out why a NI cDAQ 9191 chassis has connection drops when connected wireless and works
    perfectly when connected thru LAN.
    I wrote a little test VI to check the connection accuracy. The chassis has a NI 9375 I/O module plugged in.
    A Moxa AWK3121 is used as wireles access point. What I do is check 5 digital inputs and control 3 digital outputs.
    The outputs are continuously placed on/off at a different rate. I use an event loop and a main loopt that communicates
    to the chassis at a loop rate of 10ms.
    The chassis, laptop and Moxa A.P. are all close together on my desk. The Wifi signal is excellent.
    Now, the code i written is probably not optimal.
    But...  If I start with connecting the chassis with a LAN cable to my laptop, Wifi Disabled, Linked Local. The communication is perfect.
    No drops between the loops and the real time.        
    No communication errors. Runtime was 52 minutes.
    Second test. Connected the chassis to the Moxa A.P. with LAN cable. Laptop connected wireless to the Moxa A.P.
    Chassis still in Link Local. Ik can access the chassis in MAX. No problem.
    When I run my test, I immediately see loop pauzes. After one minute there can be already a difference of 20 sec.
    between calculated looptime and real time. Sometimes the active light on the chassis goes off and on.
    When the active light is out, the loop is on hold. (Wich is normal as I assume the DAQ VI's are waiting for response.)
    After appr.10 minutes the error -50405 "No Transfer in progress because transfer was aborted by client".
    If I look at the timings there is already a difference of more then 5 minutes between the loop timing and the real time.
    As last I tested with the chassis and the PC connected wireless to the Moxa A.P.
    I did not get the -50405 error, but again loop drops. After 10 minutes there was a shift of 2 minutes.
    Has anyone experience with wireless connections with the NI 9191 chassis?
    Can I change my code? Did I mis something? (I'm a newbie to Labview)
    Any help or suggestions would be appreciated.
    Thanks in advance.
    Frankie.
    Labview 2014 SP1 (32bit) on Windows 7 Enterprise (X64)
    Chassis and Moxa all updated to the latest firmware.
    Solved!
    Go to Solution.
    Attachments:
    Chassis919Tester.vi ‏51 KB
    Symmetrical_Pulse_Generator.vi ‏55 KB

    I am not clear on whether you are connecting the two together "in it's own little network" (which implies "router" and not "AP") or if you are connecting to the LAN through the wireless device (in which case it is entirely appropriate to refer to the wireelss device as an "AP").  Your last post about hot spots is what confused me.
    But as you said, the biggest worry is the active light.  Try using a different router/AP.  I've seen routers overheat and reset themselves before due to inadequate heat sinking.  i.e., Someone (not me, I swear!) dropped the AP and knocked the heat sink off the chip.
    As for the delay, if you are indeed using the Moxa as an AP, are you sure you're connecting to your AP?  If you're connected to a hotspot instead, your throughput will be at least halved - and maybe even 1/4 bandwidth if your AP happens to have connected to a different hotspot than you did.  If you are using it as a router, try differnt bands or channels to see if you can get around any interference your company wireless network might be generating.
    In general, conclude that wireless isn't the best way to connect test devices together.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Oracle Stored Procedure Not Accepting Comma delimited values in database

    I have a stored procedure which does the following, declares variables and assigns values retrieved from a parameter temp_table database to each variable, then it reads column headings from a master table. Using the variables assigned to each parameter from the temp_table as a filter, the rows from the MASTER TABLE are finally output by the procedure. The stored procedure works fine when dealing with single value string values passed from the parameter temp_table.
    The problem comes in when multiple values are selected and stored in the database parameter field as a comma separated string, eg. A045, A012
    So, the strored procedure has been modified to use a function to split the string into separate values: 'A045' and 'A012'. So that: A045, A012 from the database will be returned to the stored procedure variable as *('A045', 'A012')* . When testing the stored procedure using the static values *('A045', 'A012')* , data is returned.
    eg. EMPLOYEE_MASTER.CODE IN ('*A045*', '*A012*') will return results
    However, when *('A045', 'A012')* is dynamically concatenated from the function and assigned to variable:
    paramCode := split_str(paramCode) with paramCode eventually being passed: *('A045', 'A012')*
    to become:
    EMPLOYEE_MASTER.CODE IN (paramCode)
    then NO DATA is returned.
    I am stuck and don't know what the problem is. If anyone has any ideas, please feel free to help. I have included the Actual Stored Procedure below for a better understanding.
    --------------------------------------------- STORED PROCEDURE-------------------------------------------------------
    create or replace
    PROCEDURE GETEMPLOYEEDATA
    ( sesId IN VARCHAR2,
    l_cursor in out sys_refcursor
    ) is
    compCode varchar(200);
    businessUnit varchar(200);
    locCode varchar(200);
    hrDeptID varchar(200);
    glDept varchar(200);     plat varchar(200);
    deptFunc varchar(200);     empType varchar(200);
    unionCode varchar(200);     jobCode varchar(200);     
    careerLvl varchar(200);     
    empStatus varchar(200);
    zid varchar(200);
    superID varchar(200);
    counter varchar(200) ;
    token_index number;
    --v_errm VARCHAR2(256);
    BEGIN
    dbms_output.put_line('Start of BEGIN');
    /* Counter to get number of Unique Employee ID based on valid Session ID */
    select count(*) into counter from XXCCHRWEB.hr_web_sessionid_tmp where parameter_20=sesId;
    open l_cursor for SELECT counter EMPLOYEE_ID, '' LAST_NAME,
    '' FIRST_NAME from dual;
    dbms_output.put_line('OPENING FIRST CURSOR');
    /* If no valid session ID returned then error gently */
    if counter=0 then
    open l_cursor for SELECT '' EMPLOYEE_ID, '' LAST_NAME,
    '' FIRST_NAME,'' MIDDLE_NAME,'' NAME,
    '' EMPLOYEE_TYPE, '' COMPANY, '' COMPANY_DESCRIPTION,
    '' BUSINESS_UNIT, '' BUSINESS_UNIT_DESCRIPTION, '' LOCATION,
    '' LOCATION_NAME, '' HR_DEPARTMENT_ID,'' DEPARTMENT_NAME,
    '' DEPARTMENT_FUNCTION, '' PLATFORM, '' JOB_CODE,
    '' JOB_TITLE, '' BUSINESS_TITLE, '' MANAGER_LEVEL,
    '' JOB_FUNCTION, '' GL_DEPARTMENT_ID, '' GL_OP_UNIT,
    '' GL_RESPONSIBILITY_CENTER, '' HR_CHANNEL,'' FULL_OR_PART_TIME,
    '' REGULAR_OR_TEMP, '' GRADE,'' UNION_CODE,
    '' BARGAINING_UNIT, '' ANNUAL_RATE,'' HOURLY_RATE,
    '' HIRE_DATE, '' BIRTH_DATE, '' REHIRE_DATE,
    '' SERVICE_DATE, '' POSITION_NUMBER, '' REPORTS_TO,
    '' REPORTS_TO_TITLE, '' SUPERVISOR_ID, '' SUPERVISOR_NAME,
    '' LAN_ID from dual;
    dbms_output.put_line('End of counter=0');
    -- return;
    end if;
    /* read from hr_web_sessionid_tmp */
    select
    parameter_1,parameter_2, parameter_3, parameter_4,
    parameter_5,parameter_6, parameter_7, parameter_8,
    parameter_9,parameter_10, parameter_11, parameter_12,
    parameter_13, parameter_14
    into
    compCode,     businessUnit,     locCode, hrDeptID,
    glDept,     plat,     deptFunc,     empType,
    unionCode, jobCode,     careerLvl, empStatus,
    zid, superID
    from
    XXCCHRWEB.hr_web_sessionid_tmp
    where
    parameter_20= sesId;
    /*Assigning All Value to NULL superID*/
    IF superid is null then
    superID:= 'All';
    END IF;
    jobCode:='('''|| get_token(jobCode, 1)||''')'||','||'('''|| get_token(jobCode, 2)||''')';
    dbms_output.put_line('SELECTING PARAMETERS FROM TEMP TABLE WITH ROW COUNT : '||l_cursor%ROWCOUNT);
    /* read from Employee Master */
    open l_cursor for SELECT DISTINCT * FROM ( SELECT HR_EMPLOYEE_MASTER.EMPLOYEE_ID, HR_EMPLOYEE_MASTER.LAST_NAME,
    HR_EMPLOYEE_MASTER.FIRST_NAME, HR_EMPLOYEE_MASTER.MIDDLE_NAME, HR_EMPLOYEE_MASTER.NAME,
    HR_EMPLOYEE_MASTER.EMPLOYEE_TYPE, HR_EMPLOYEE_MASTER.COMPANY, HR_EMPLOYEE_MASTER.COMPANY_DESCRIPTION,
    HR_EMPLOYEE_MASTER.BUSINESS_UNIT, HR_EMPLOYEE_MASTER.BUSINESS_UNIT_DESCRIPTION, HR_EMPLOYEE_MASTER.LOCATION,
    HR_EMPLOYEE_MASTER.LOCATION_NAME, HR_EMPLOYEE_MASTER.HR_DEPARTMENT_ID, HR_EMPLOYEE_MASTER.DEPARTMENT_NAME,
    HR_EMPLOYEE_MASTER.DEPARTMENT_FUNCTION, HR_EMPLOYEE_MASTER.PLATFORM, HR_EMPLOYEE_MASTER.JOB_CODE,
    HR_EMPLOYEE_MASTER.JOB_TITLE, HR_EMPLOYEE_MASTER.BUSINESS_TITLE, HR_EMPLOYEE_MASTER.MANAGER_LEVEL,
    HR_EMPLOYEE_MASTER.JOB_FUNCTION, HR_EMPLOYEE_MASTER.GL_DEPARTMENT_ID, HR_EMPLOYEE_MASTER.GL_OP_UNIT,
    HR_EMPLOYEE_MASTER.GL_RESPONSIBILITY_CENTER, HR_EMPLOYEE_MASTER.HR_CHANNEL, HR_EMPLOYEE_MASTER.FULL_OR_PART_TIME,
    HR_EMPLOYEE_MASTER.REGULAR_OR_TEMP, HR_EMPLOYEE_MASTER.GRADE, HR_EMPLOYEE_MASTER.UNION_CODE,
    HR_EMPLOYEE_MASTER.BARGAINING_UNIT, HR_EMPLOYEE_MASTER.ANNUAL_RATE, HR_EMPLOYEE_MASTER.HOURLY_RATE,
    HR_EMPLOYEE_MASTER.HIRE_DATE, HR_EMPLOYEE_MASTER .BIRTH_DATE, HR_EMPLOYEE_MASTER.REHIRE_DATE,
    HR_EMPLOYEE_MASTER.SERVICE_DATE, HR_EMPLOYEE_MASTER.POSITION_NUMBER, HR_EMPLOYEE_MASTER.REPORTS_TO,
    HR_EMPLOYEE_MASTER.REPORTS_TO_TITLE, HR_EMPLOYEE_MASTER.SUPERVISOR_ID, HR_EMPLOYEE_MASTER.SUPERVISOR_NAME, HR_EMPLOYEE_MASTER.GENDER,
    HR_EMPLOYEE_MASTER_1.LAN_ID
    FROM
    (XXCCHR.HR_EMPLOYEE_MASTER HR_EMPLOYEE_MASTER_1
    LEFT OUTER JOIN
    XXCCHR.HR_DEPARTMENT_SECURITY HR_DEPARTMENT_SECURITY
    ON
    HR_EMPLOYEE_MASTER_1.EMPLOYEE_ID=HR_DEPARTMENT_SECURITY.EMPLOYEE_ID)
    LEFT OUTER JOIN
    XXCCHR.HR_EMPLOYEE_MASTER HR_EMPLOYEE_MASTER
    ON
    -- HR_DEPARTMENT_SECURITY.DEPARTMENT_SECURITY=HR_EMPLOYEE_MASTER.HR_DEPARTMENT_ID
    (HR_DEPARTMENT_SECURITY.DEPARTMENT_SECURITY=HR_EMPLOYEE_MASTER.HR_DEPARTMENT_ID
    or
    HR_DEPARTMENT_SECURITY.DEPARTMENT_SECURITY in ('DPALL','DPCAG009'))
    WHERE
    HR_EMPLOYEE_MASTER_1.LAN_ID=upper(zid) and
    (compCode = 'All' or HR_EMPLOYEE_MASTER.COMPANY IN compCode)
    (jobCode = 'All' or HR_EMPLOYEE_MASTER.JOB_CODE IN (jobCode) ) ) ;
    dbms_output.put_line('END OF SELECT for counter number : ' || counter ||' Cursor row count : '|| l_cursor%ROWCOUNT || ' with Job Code : ' || (jobCode));
    dbms_output.put_line('Company Code is:' || compCode);
    COMMIT;
    dbms_output.put_line('Data has been Output with session id:' || sesId);
    --delete from XXCCHRWEB.hr_web_sessionid_tmp where parameter_20= sesId;
    dbms_output.put_line('Data should have been DELETED, please check the session temp table');
    commit;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('AN EXCEPTION HAS BEEN CAUGHT for counter number : ' || counter ||' Cursor row count : '|| l_cursor%ROWCOUNT || ' from session id : ' || sesId);
    dbms_output.put_line('The error code is ' || SQLERRM);
    END GETEMPLOYEEDATA;
    Edited by: user10384134 on Nov 4, 2009 8:37 AM

    This seems to work for me:
    define param="'ABC','XYZ'"; --- Set up a test in clause
    --- Test data
    with test as
    (select 'ABC' fld from dual union all
    select 'DEF' from dual union all
    select 'PQR' from dual union all
    select 'XYZ' from dual)
    --- Query starts here.
    select fld
    from test,
           table (sys.ODCIVarchar2List (&param)) p
    where fld = p.column_valueOr Using an actual "IN" clause:
    define param="'ABC','XYZ'";
    with test as
    (select 'ABC' fld from dual union all
    select 'DEF' from dual union all
    select 'PQR' from dual union all
    select 'XYZ' from dual
    p as
    (select column_value from table (sys.ODCIVarchar2List (&param))
    select fld
    from test
    where fld in (select column_value from p)Edited by: AlanWms on Nov 4, 2009 9:08 AM

Maybe you are looking for

  • Need Help With File Matching Records

    I need help with my file matching program. Here is how it suppose to work: FileMatch class should contain methods to read oldmast.txt and trans.txt. When a match occurs (i.e., records with the same account number appear in both the master file and th

  • CSV to Internal table

    Hi friends, Have a look at my code. The basic requirement is to load into table PTRV_KMSUM. I was able to do that using GUI upload FM from a notepad . But now the requirement is using a CSV file to load into PTRV_KMSUM. REPORT  zhr_t_ptrv_kmsum  NO S

  • Null Values(Urgent Req)

    Hi Guys, I have a date column where I use Max(Date) function... As per the req I have changed the Date format to MMM-dd-YYYY from mm-dd-yyyy... Now I want to display "No Date" when ever the data value is null.... I tried writing a case statement by c

  • String& char

    Hi; Could anyone tell me a buildin class for find out how many characters in a text file(or a string) and it's length(count by character). For example; "ghggjjkk kjkjk" it has 14 characters and length is 14 Thanks

  • MDT Media - StateStore on USB Deployment media drive?

    MDT 2012 update 1 I'm doing a Refresh (migrating XP to 7) using USB Media of my working task sequence. Everything works, migrates to 7 with all user data etc.. However I noticed it takes a very long time. There's a "StateStore" folder being created o