Select/Read/Update in packages

Hello Masters.
I'm having a problem with a report that is supposed to update a field in a table.
This table has 3.4 million lines and I have to update all of the lines, because of a new field I've just appended.
The program is giving me an error of lack of space to increase my local table (TSV_TNEW_PAGE_ALLOC_FAILED
) and the only way I'm seeing to solve this problem is to read this table in smaller packages; after I have all these smaller packages I can go on with the rest of the updating.
I'm I thinking right? What do you advise me to do? How can I do several selects to pick up all the data in the end? Is there a way to do a select for the first 200 thousand and then the next 200 thousand or something like that? How can I know if I'm already at the end of the major table?
Thank you in advance for your help.
Regards.
Jorge Ferreira

Hi,
maybe you can use some old field of your table to divide lines into categories. The values of this field will distribute lines of your table into smaller chunks. For example if table contains year you will run your report for each year in the table.
Another way is that you will use addition UP TO n ROWS in your SELECT statement. So you will select first 10 000 lines where the new field is still initial. Then you will update these lines and do SELECT statement again. After initialization of the new field in first 10 000 line you will select next 10 000 lines. This method will not work if initial value is allowed value of your new field. You will be still loading same lines again and again.
Cheers

Similar Messages

  • DBMS_LOCK vs Select for update locking

    Hi,
    In one of our database packages, we are using the dbms_lock (that package is used to generate unique numbers) instead of select for update locking.
    I want to ask what is more suitable here. Our application is oracle forms and oracle db on oracle app server.
    Are there any limitations to select for update locking?
    What are the conditions favourable to use DBMS_LOCK?
    Regards,

    DBMS_LOCK is extremely efficient. Try it. Put a call to obtain/free a lock in a loop and see how long it takes to loop a few thousand times (don't SLEEP in the loop, just obtain and free the lock). If you are having performance issues with DBMS_LOCK or your select it is probably because whatever it is that gets the lock (whichever way you get it) is taking a certain amount of time to finish.
    I too, am curious as to what "issues" you had. In either case, a lock for consistent read will be different than a lock for update (as it should be) in terms of how it impacts other users.

  • Unlock SELECT FOR UPDATE

    I have to do a "SELECT FOR UPDATE" query to modify a CLOB column.
    The problem is that i want to release this lock BEFORE i commit or rollback de transaction.
    How can i do it?
    Thanks

    Also, i want to release the lock to prevent a deadlock with another transaction, but without doing a commit, so i can rollback it if any error is produced after. You must remember that releasing the lock means that you are not interested in that part of the transaction (or the entire transaction). You cannot have the option of releasing the lock and preserving the transaction so as to allow others to do whatever with that data. This will violate transaction integrity.
    Partial rollback seems to be what you need. If the driver is the problem, you could always package your logic into a procedure (prefarably in a package) and call that procedure from your driver (hoping the driver allows calling of stored procedures).

  • Mannual update a package in DTP

    Hi Experts
    In the version 3.x we have the option (in case of failing) to mannual update an Package in the request, however i could not find the same option in the DTP. Does anyone know if this is possible?
    If yes, where i can find this option?
    If no, how should I proceed now?
    Thanks

    Hi Rody,
    In the 7.x release the idea is that you use the error handling functionality in the DTP to update data packages that have
    errors. In 7.x the option to manually update a request does not exist like in 3.x,  in the monitor if you select the menu
    option 'Request' you should have the option to 'Post manually' the request. In this case the complete RED request
    is reloaded but you don't need to delete the existing request from the data target.
    Best Regards,
    Des.

  • Error message: "playlists selected for updating no longer exist"

    I tried to update my ipod nano and I guess I had deleted a playlist, but since then, I have not been able to update. Every time I try, I get the following message:
    "Cannot be updated because all of the playlists selected for updating no longer exist."
    I haven't been able to highlight which playlists are selected to begin with.
    I read through the manual and thought that maybe rebooting the whole system might work. So I deleted Itunes from my computer and re-installed.
    Then I tried re-setting my ipod. So now I have nothing on my ipod.
    I also deleted everything from my library, thinking it might help to start from scratch. Nothing has worked.
    How do I "select" and "unselect" playlists so I can get up and running again?

    Here you go.
    http://discussions.apple.com/thread.jspa?messageID=607312&#607312

  • Lost music on ipod because "playlists selected for updating no longer exist

    Not sure what I've done. I recently downloaded newer version of itunes. Then when synching, I had too much music in my library for the ipod to handle so it told me about doing the smart playlist. I erased a couple of playlists on the itunes menu I no longer wanted and then when I went to synch, this error came up "songs on the ipod cannot be updated because all of the playlists selected for updating no longer exist."
    Please help.....

    Check this out.
    iPod cannot sync because one or more playlist....

  • I deleted all my playlists selected for updating!!!

    There is no music on my ipod and I can't figure out how to get the stuff from my library onto my ipod. I deleted all my original playlists thinking I was saving room. I know i'm an idiot. How do I get the music on there!! Help!!!

    Open iTunes prefs -> iPod.
    Select Automatically update all songs and playlists.

  • "Playlists selected for updating no longer exist"?!

    everytime i plug my ipod mini into the computer, a pop up appears saying that the playlists selected for updating no longer exist!!! it's done this before, so i completely restored the setting and made a whole new library. now it's doing it again. i have all the playlists and songs on my computer in a folder. all the songs that were on my ipod, got deleted when i plugged it into the computer. so my ipod is blank, but i have the songs in my library still. they just wont upload. any help would be greatly appreciated....

    Check this out.
    iPod cannot sync because one or more playlist....

  • Difference in select for update of - in Oracle Database 10g and 11g

    Hi, I found out that Oracle Database 10g and 11g treat the following PL/SQL block differently (I am using scott schema for convenience):
    DECLARE
      v_ename bonus.ename%TYPE;
    BEGIN
      SELECT b.ename
        INTO v_ename
        FROM bonus b
        JOIN emp e ON b.ename = e.ename
        JOIN dept d ON d.deptno = e.deptno
       WHERE b.ename = 'Scott'
         FOR UPDATE OF b.ename;
    END;
    /While in 10g (10.2) this code ends successfully (well NO_DATA_FOUND exception is raised but that is expected), in 11g (11.2) it raises exception "column ambiguously defined". And that is definitely not expected. It seems like it does not take into account table alias because I found out that when I change the column in FOR UPDATE OF e.empno (also does not work) to e.mgr (which is unique) it starts working. So is this some error in 11g? Any thoughts?
    Edited by: Libor Nenadál on 29.4.2010 21:46
    It seems that my question was answered here - http://stackoverflow.com/questions/2736426/difference-in-select-for-update-of-in-oracle-database-10g-and-11g

    The behaviour seems like it really is a bug and can be avoided using non-ANSI syntax. (It makes me wonder why Oracle maintains two query languages while dumb me thinks that this is just a preprocessor matter and query engine could be the same).

  • I accidently deleted the playlist selected for updating thing...

    i was adding new songs to my ipod and i guess there were too many songs there so it asked me if i wanted it to choose some songs randomly...
    so i chose "ok" but actually i didnt really want it to choose songs on its own so i deleted the list that was automatically created by itself and decided to delete some songs on my own...
    after doin that, i tried to update it but now it says i cant do it because i deleted that list...
    it says "songs on the ipod "stephanie kim" cannot be updated because all of the playlists selected for updating no longer exists"
    i turned my computer off and tried it again several times but it wont work...
    and all the songs in my ipod are gone now...
    is there anything i can do?

    http://support.apple.com/kb/PH10918
    Best.

  • Can I use a select and update statement in a single jsp file?

    I want to update the BUY table everytime I would add a SELL transaction.....I want to minus the stocks that I sold to those that Ive bought before.....
    note: I used a seperate table in BUY and SELL transaction
    After I Have added a transaction, I want to update the buy table. This is my problem, can I used both SELECT and UPDATE statement at the same time in a single jsp file for example like this:
    select * from test, test1;
    update test
    set total_shares=total_shares-Stotal;
    where stock_code=Scode AND name_broker=Sbroker;
    Can i have both of these statements in the same jsp file in oder to update the buy table?
    Or can anyone suggest how can process that update?THANKS!
    --------------------

    Can i have both of these statements in the same jsp file in oder to update the buy table?Yes. But wouldn't it have been easier just to try it?

  • Rogue implicit SELECT FOR UPDATE statement in forms 9i  9.0.4.0.19

    all,
    out of 200 production forms, one form occasionally and incorrectly "selects for update" an entire 3 million row table, during an update transaction. this creates 100+ archive logs.
    we cannot repeat the event via testing. but the rogue select statement has been captured from SGA and is listed below. its plain to see that somehow the where clause is truncated to a W, and is then used as a table alias, resulting in the entire table being locked.
    has anyone seen anything like this?
    SELECT ROWID,DISTRIBUTION_PARTY,DISTRIBUTION_PARTY_NAME,CORRESPOND_SEQ_NUM,DISTRIBUTION_SEQ_NUM,VENDOR_NUM,DEPENDENT_SEQ_NUM,INTERNAL_ATTORNEY_USER_NAME,MAIL_LOC,ORIGINAL_FLAG
    FROM CLAIM_DISTRIBUTION_DATA W
    FOR UPDATE OF DISTRIBUTION_PARTY NOWAIT

    Find out where this select statement is issued from first of all. Is it in your code or is it issued implicitely by Forms? Since it has rowid I assume it is an implicit Forms call.
    Do you use on-update triggers any where in this form? on-lock?

  • Maximum number of selections in an info package

    Hi friends,
    i want to load an ODS with data from MSEG. Due to the great number of records I've to select by
    0ATERIAL. Selection criteria are provided by a routine I'll write for this selection, reading a different
    ODS. Estimated number of records for selection is about 80,000.
    My question:
    Is there any restriction regarding the number of selection criteria of an Infoobject in info packages?
    Will a selection work with 80,000 criteria?
    Any input is highly appreciated.
    Thanks in advance and regards
    Joe

    Hello,
    If I understood correctly...you will compare the values from a DSO and then pass these values in the infopackage selections..
    but how are you planning to do it...will it be interval or single value??
    Also I think you can assign only one value or range in the infopackage at a time for selection through routine...
    More the number of selections more the number of AND in the where clause.
    I am not sure if there is any limitations on where clause but after 100 selection the select queries become complex and overflow the memory...so thats the limitation.
    Thanks
    Ajeet

  • JDBC Sender - Different number of records selected and updated.

    Hi people,
    We have a JDBC -> Abap proxy scenario. The JDBC sender is pooling an Oracle database to retrieve data from a table X, each 30 minutes. The select and update statements in jdbc sender are below
    SELECT FIELD1, FIELD2, FIELD3 FROM MY_TABLE WHERE STATUS = 1
    UPDATE MY_TABLE SET STATUS = 2 WHERE STATUS = 1
    Sometimes the message sent to Abap proxy has, for example, 400 records. Looking at runtime workbench, message monitoring, for the same message there is a log like this
    Channel SENDER_JDBC_CHANNEL: Query executed successfully. Start update
    Channel SENDER_JDBC_CHANNEL: 510 row(s) updated successfully
    Someone has already experienced something like this? How can I handle this to guarantee to update only those read records?
    regards.
    roberti

    Hi All,
    Even we are facing the same problem.
    In our scenario, receiver is SAPR3. (IDOC)
    Will this parameter serialization work in our case?
    1. SELECT XBLNR, WERKS, MATNR, MDV01, BACKFLQUANT, STATUS, SAPTIMESTAMP, PITSTIMESTAMP, PMTIMESTAMP, BATCH FROM PMBPITS.PITS_UNITY WHERE STATUS = '01' and rownum<200 . 
    2. UPDATE PMBPITS.PITS_UNITY SET STATUS = '02' , SAPTIMESTAMP = sysdate WHERE STATUS = '01' and rownum<200  ( currently the value is rownum < 5 )
    Thanks!!
    Regards
    Gouri

  • Why do old Adobe PDF files which I attach to a document show as Firefox files instead of an Adobe PDF file after an Adobe Reader update??

    Why do old Adobe PDF files which I attach to a document show as Firefox documents in my files instead of an Adobe PDF file after an Adobe Reader update?  My saved files Adobe PDF documents also appear as Firefox documents instead of Adobe PDF files.

    NO MATTER WHAT VERSION OF WINDOWS YOU'RE USING:
    Right click one of the PDFs with the Word icon.
    Select "Properties"
    Where it says "Opens With" there is a button to change it from Word to Adobe Reader, which should be in the list of available programs that pops up.
    Choose Reader, and click APPLY before clicking OK.
    That will change ALL PDFs to Reader as the default application.

Maybe you are looking for