How to do this Update

I need to add a 'serial_no' column to a table. The existing PK consists of non-consecutive values. The serial_no column which should follow the ordering of the PK and increased by exactly 1 for the next pk. How to write this UPDATE? I cannot use 'UPDATE t SET serial_no=ROWNUM' as the result is not guaranteed to be following the order of the PK.
pk, serial_no
10, 1
12, 2
14, 3
18, 4
....

here is one way to do :
SQL> select * from t;
PK SERIAL_NO
10
12
14
18
1 merge into t using (select pk, row_number() over (order by pk) rn from t) a
2 on (t.pk = a.pk)
3* when matched then update set t.serial_no = a.rn
SQL> /
4 rows merged.
SQL>
SQL> select * from t;
PK SERIAL_NO
10 1
12 2
14 3
18 4

Similar Messages

  • How to install this update and solve USB and touchpad issues?

    I have Equium M50 (59E) and got bitten by an update that took out my touchpad and keyboard .I have made fresh install of XP Home and have all updated drivers and all is going well .The last update i cant seem to fathom is for
    Driver Ana _2005_10_24_V1.2 it is for ,Standard Open HCD USB Host Controller........X 2 .........
    The update fixes all kinds of issues of the kind i am having and is a recomended update from Driver detective ,that i use offten .
    The trouble is it says to uninstall drivers for the one i have installed allready and when i do this it knocks off my USB mouse leaving me not able to install the new ones .When i reboot it installs the ones i dont want reinstalled .
    This is the read me off the new update and realy it is beyond me to underdstand what to do ............so here it is ?
    Driver revision history:
    Twinhan VP704A Driver Release note
    Note:
    1.In case the system crashes while running with VP704A, Please install ULI
    USB 2.0 host driver in \ULiUSB20Driver
    2. For XP/SP1, please update with the patch in
    <http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&familyid=733dd867-56a0-4956-b7fe-e85b688b7f86>
    3.In XP/SP1, updating driver will crash the system, while new install is ok.
    The trick to update driver in XP/SP1 is shown in the following steps,
    a. Uninstall the driver
    b. Unplug and plug the USB device
    c. Install the driver
    4. To support remote controller, please launch Agent.exe in \Agent.
    Further details can be found in \Agent\Readme.txt
    Known issues:
    1. Multi-instance is not supported
    2. Remote wakeup is not supported
    3. High CPU usage in Analog audio/video capture
    4. Bad VBI Signal using YUY2 color format
    5. AV out of sync if audio captured from wrong filter.
    (Fix:using the filter "USB Audio Device" in WDM stream capture device)
    6. Noise with analog-TV and FM Radio
    (Fix:using the filter "USB Audio Device" in WDM stream capture device)
    Driver revision history:
    2005/10/24, Version: 1.0.2.8
    Bugs fixed and new features:
    1.Crossbar not properly set.
    2005/10/21, Version: 1.0.2.7
    Bugs fixed and new features:
    1.Firmware version read from FLASH OK!
    2005/10/14, Version: 1.0.2.6
    Bugs fixed and new features:
    1.Mutil-Access driver blank part below part screen when VBI!
    2.Mutil-Access driver HCT driver verify crash fix!
    2005/10/07, Version: 1.0.2.5
    Bugs fixed and new features:
    1.Tuner Power off when S-Video,Composite.
    2005/09/30, Version: 1.0.2.4
    Bugs fixed and new features:
    1.Agent.exe updated for repeat bug!
    2.TI5150 Register for Video Format fix!
    2005/09/29, Version: 1.0.2.3
    Bugs fixed and new features:
    1.A trial driver build for multiple access support. (in the folder "\Multi-Access")
    Note: "USB Audio device" filter provided by system does not support mutil-Access.
    2.Reset TI5150 when a new frequency is set
    2005/09/27, Version: 1.0.2.2
    Bugs fixed and new features:
    1.Fix I2C unstable access on some devices.
    2005/09/23, Version: 1.0.2.1
    Bugs fixed and new features:
    1.Analog TV becomes darker sometimes.
    2005/09/15, Version: 1.0.2.0
    Bugs fixed and new features:
    1.Fix INF for Windows 2000 installation.
    2.FM radio scan policy changed!
    2005/09/13, Version: 1.0.1.9
    Bugs fixed and new features:
    1.USB serial number string not visible with USBView, firmware update required.
    2.FM radio scan policy, return unlock if PLLOffset>=9x12.5KHz
    2005/09/13, Version: 1.0.1.8
    Bugs fixed and new features:
    1.After switching between A/D/AV several times, video display becomes dark in THDTV 2.61
    2005/09/12, Version: 1.0.1.7
    Bugs fixed and new features:
    1.Improve channel lock status check performance
    2.Pinnacle INF Fix.
    2005/09/09, Version: 1.0.1.6
    Bugs fixed and new features:
    1.Add some audio initialization function.
    2005/08/31, Version: 1.0.1.5
    Bugs fixed and new features:
    1.NTSC & PAL mode resolution separation.
    2005/08/30, Version: 1.0.1.4
    Bugs fixed and new features:
    1.AvgTimePerFrame.
    2.Frame Drop.
    3.Pinnacle inf file HCT chkinf fail.
    2005/08/22, Version: 1.0.1.3
    Bugs fixed and new features:
    1.Add Remote controller interface in digital source filter.
    2.A new Remote controller test tool with source code in \Test_RC.
    2005/08/16, Version: 1.0.1.2
    Bugs fixed and new features:
    1.Reorg Pinnacel & Twinhan's driver & folder.
    2.VP704A_BDA_Test tool, add system code test.
    3.Set IR protocol standard by registry keys "IRSTANDARD", "IRSYSCODECHECK1" in INF file.
    4.Firmware update
    2005/08/15, Version: 1.0.1.1
    Bugs fixed and new features:
    1.Serial number function is lost while adjusting TV audio volume
    2.RC6A CIR support
    (This firmware uses GPIO3 (M9207 pin 80) to decode RC6 protocol.
    The hardware should be reworked to connect M9207 pin 80 to CIR module and the fimrware
    EEPROM should be flashed with \Firmware\M9207.bin )
    3.Serieal number, MAC address and OEM device name supported.
    Please refer to further details in \Firmware\readme.txt.
    4.Ioclt sample source code included.
    2005/08/08, Version: 1.0.0.10
    Bugs fixed and new features:
    1.Analog TV audio volume increase.
    2005/08/04, Version: 1.0.0.9
    Bugs fixed and new features:
    1.Analog TV Video mode set failure.
    2005/08/03, Version: 1.0.0.8
    Bugs fixed and new features:
    1.Off-centerf requency scan +/- 125Khz
    2.Fix duplicated program scanned in MCE.
    2005/08/02, Version: 1.0.0.7
    Bugs fixed and new features:
    1.THBDAConsole.exe "ulFixedBW", "ulDisableOffFreqScan", "ulMCEFreqTranslate" bug fixed
    2005/07/28, Version: 1.0.0.6
    Bugs fixed and new features:
    1.THBDAConsole.exe "ulFixedBW", "ulDisableOffFreqScan", "ulMCEFreqTranslate" support
    2.Improve I2C communication stability.
    3.Unify Signal strength & quality indication as THBda ioctl interface.
    4.Capture filter Lock status check.
    2005/07/28, Version: 1.0.0.5
    Bugs fixed and new features:
    1. The same signal strength & quality indications as VP7046.
    2. Debug build driver
    2005/07/21, Version: 1.0.0.4
    Bugs fixed and new features:
    1.Update INF.
    2005/07/20, Version: 1.0.0.3
    Bugs fixed and new features:
    1.Improve performance in PCM4
    2.Switching from Analog TV Mode to FM Mode failure
    2005/07/04, Version: 1.0.0.2
    Bugs fixed and new features:
    1.Production Tool FM test OK!
    And here is the readme from the other file within the update ?
    ULi PCI to USB Enhanced Host Controller Driver V1.72 for Windows 98 SE, Windows ME , Windows 2000 and Windows XP
    INTRODUCTION
    This driver supports ULi EHCI host Controller under Windows 98 SE, Windows ME , Windows 2000
    and Windows XP.
    CONTENTS OF THIS DOCUMENT
    1. Installation Instructions
    2. Uninstallation Instructions
    1. Installation Instructions
    (Windows 98 SE & Windows ME)
    A.When ULi USB 2.0 Controller has attached on system
    1. Install ULi USB2.0 Driver
    - Run the setup program.
    - This program will copy driver files into your Windows system,then restart your computer.
    2. After system reboot, Windows will find the new hardware "ULi PCI to USB Enhanced
    Host Controller" and install the driver.
    B.If no ULi USB 2.0 Controller on system
    1. Install ULi USB2.0 Driver
    - Run the setup program.
    - This program will copy driver files into your Windows system, then turn off your computer.
    - Attach ULi USB 2.0 Controller card on your system and then reboot your computer.
    2. After system reboot, Windows will find the new hardware "ULi PCI to USB Enhanced
    Host Controller" and install the driver.
    (Windows 2000)
    A.When ULi USB 2.0 Controller has attached on system
    1. Install ULi USB2.0 Driver
    - Run the setup program.
    - This program will install and load the driver and you don't have to reboot the
    computer.
    B.If no ULi USB 2.0 Controller on system
    1. Install ULi USB2.0 Driver
    - Run the setup program.
    - This program will copy driver files into your Windows system, then turn off
    your computer.
    - Attach ULi USB 2.0 Controller card on your system and then reboot your computer.
    2. After system reboot, Windows will find the new hardware "ULi PCI to USB Enhanced
    Host Controller" and install the driver.
    (Windows XP)
    A.When ULi USB 2.0 Controller has attached on system
    1. Install ULi USB2.0 Driver
    - Run the setup program.
    - Click "NEXT"
    - This program will install and load the driver and you don't have to reboot the
    computer.
    - After install ULi USB 2.0 driver successfully. System will detect "USB 2.0 Root
    Hub". Please select "install the software automatically (Recommended)" and then
    click "Next" button to continue install.
    - This program will install and load the driver and you don't have to reboot the
    computer.
    B.If no ULi USB 2.0 Controller on system
    1. Install ULi USB2.0 Driver
    - Run the setup program.
    - This program will copy driver files into your Windows system, then turn off
    your computer.
    - Attach ULi USB 2.0 Controller card on your system and then reboot your computer.
    2. After system reboot, Windows will find the new hardware "ULi PCI to USB Enhanced
    Host Controller", continue to install.
    - After install ULi USB 2.0 driver successfully. System will detect "USB 2.0 Root
    Hub". Please select "install the software automatically (Recommended)" and then
    click "Next" button to continue install.
    Notice:
    If you can't setup driver successfully. Please reboot your system and then follow
    above steps to install driver again.
    2. Uninstallation Instructions
    1. Open "Control Panel" folder.
    2. Invoke "Add\Remove Programs" icon.
    3. Choose "ULi USB2.0 Driver" item.
    4. Click on "Add/Remove" button to remove drivers.
    Change List:
    1.74
    1.fix issue that multi-interface keyboard can not be detected on the usb2.0 hub.
    2.support all USB2.0 Host Controller.
    1.73
    1.fix issue that On Win98SE , Blue screen when unplugging some USB2.0 Scanner after scanning image.
    2.fix issue that On Win98SE, Blue screen when unplugging some USB2.0 Scanner from USB 2.0 Hub after scanning image.
    3.fix issue that On Win98SE, Blue screen while copying files across the SUNBOX UH-204 Hub.
    4.fix issue that wirless lan will disconect when plug-in usb device.
    1.72
    1.Fix issue that system will crash when USB HD copy large file.
    1.71
    1.improve Power management function in Win98/ME.
    1.70
    1.Improve the function of devcie detection.
    1.62
    1.Fix the problem that a USB floppy under USB 2.0 HUB cannot function when system resume from suspend.
    1.61
    1.Fix the problem that some USB device under USB 2.0 HUB cannot be found if system resume from suspend.
    1.60
    1.To support power management functions when a HUB with USB device plug into
    a root HUB.
    1.57
    1.Fix USB floppy with USB 2.0 HUB can't be detect issue.
    2.Fix issue that audio can't display smooth when USB device attach to system.
    3.Fix system can't detect USB dvice when USB device attach to system in
    suspend mode.
    4.Fix issue that when USB root HUB have full loading, USB HD sometimes
    transaction fail.
    1.56
    1. Fix issue that DVD decoder device can't display properly.
    1.55
    1. Fix OTI USB 2.0 hand drive can't be detect issue.
    2. Fix USB mouse can't use after resume from suspend.
    1.54
    1.Improve driver security.
    1.53
    1. Fix bulk transfer may stop if USB device is plugged in USB 2.0 hub
    2. Fix USB 2.0 mass storage device can't be access after resuming from standby if there is another USB 1.1 device existing
    1.52
    1. Fix system pages fault when accessing mass storage device in Win98SE, or scandisk failure when selecting
    automatically fix file system errors
    2. Fix system may hang up in Win98SE/ME if USB 2.0 cardbus card is plugged
    v.1.51
    1. Improve USB 2.0 cardreader compatibility.
    2. Fix USB IDE devices can't be accessed after resuming from standby/hibernation.
    v1.50
    1. Improve bulk transfer
    v1.48
    1. Fix USB 2.0 LAN driver installation hanging up
    2. Fix some USB 1.1 cardreader can't be identified when plugged into USB 2.0 hub
    3. Fix some laptops Win98SE booting hanging up
    v1.47
    1. Improve bulk transfer performance.
    2. Fix USB 2.0 bulk webcam preview failure.
    v1.46
    1. Support USB 2.0 and 1.1 Isochronous devices
    2. Fix system hanging up when rebooting system if USB 2.0 host controller is disabled in Win9X/ME
    3. Fix system hanging up when uninstalling driver if there are USB 2.0 devices connected in Win2K/XP
    4. Improve device detection capability in Win9X/ME
    v1.45
    1. Fix system hanging up when resuming from ACPI sleep mode.
    2. Fix mouse sometimes doesn't disappear when it's unplugged.
    3. Fix Win9X composite device detection failure and improve Win2K/XP composite device
    v1.44
    1. Support composite device
    2. Improve device detection
    v1.43
    1. Improve IDE read/write transfer failure rate with USB 2.0 to IDE bridge on PC card platform
    2. Fix high-speed device detected as full-speed device
    3. Fix some USB mouses detection failure problem
    4. Fix some USB 2.0 hubs detection failure problem
    5. Fix Win98SE crashing if ULi EHCI 1.42 is installed
    v1.42
    1. Fix PC Card ejection hanging up in Win98/ME
    2. Fix suspend/resume hanging up in Win98
    3. Solve sometimes USB 1.1 device can't be detected if OS boots with USB 2.0 and 1.1 devices plugged
    4. Fix some PC Card USB 1.1 device detection failure
    v1.41
    1. Add new feature that system can install driver before device is plugged.
    2. Fix PCMCIA OHCI controller resource assign issue on Windos ME.
    v1.40
    1. Support Win9X/ME/2K/XP with ULi USB 2.0 driver.
    2. Fix PCMCIA EHCI controller detecting USB 2.0 device problem in Win9X/ME.
    v1.32
    1. Fix issue that driver can't detect Microsoft driver in Windows XP
    if OS path is not c:\windows.
    2. Fix issue that driver can't detect USB 2.0 controller device in in some system.
    v1.31
    1. Fix issue that driver can't install on Windows 2000.
    v1.30
    1. Fix issue that Win9X/ME shows no USB 2.0 Root Hub.
    2. Fix issue that hanging up when second entry into Win9X S1 with HID device plugged.
    3. Fix issue that sometimes when you click "Scan for hardware changes".
    to PNP ULi USB2.0 controller, system will informs you the usbehci.sys
    file can't be found.
    4. Fix issue that v1.20 finds no EHCI controller to install driver for after different
    verison of ULi EHCI controller devices are plugged and unplugged.
    5. Support installing driver for more than one ULi EHCI controller devices existing on
    system at the same time.
    6. Fix Win2K/XP shows USB Root Hub for USB 2.0 Root Hub.
    v1.20
    1.Support ULi USB 2.0 Host controller driver for Windows 98SE/ME/2000/XP.
    ULi Coporation. (ULi) web sites:
    http://www.uli.com.tw/ (Taiwan)
    CAN ANYONE TREAT ME LIKE A TWO YEAR OLD AND GIVE SOME GUIDANCE AS TO HOW TO ACHIEVE THIS UPDATE .
    i WOULD BE VERY GRATEFULL AND KIND OF THINK IT WOULD BE BENIFICIAL TO A LOT MORE PEOPLE AS I SEE A LOT OF XP AND PROBLEMS OF THE KIND THIS UPDATE IS SUPPOSED TO FIX .

    It says above 2 relevant and 1 correct answere available .............
    I'm new here so could anyone direct me to these answeres?

  • I have an update required for Evernote in my Imac app store, but cannot find how to get this update. It says to sign in with my emailm address, but I cannot find a way to do this.  Please help!!

    I recently downloaded Mlountain Lion on my Imac. It shows that I have an update for Evernote that should be downloaded, but I cannot find out how to complete this update. It asks for me to sign in with my email address, but does not show how to do this.  Please help!

    I have done exactly what you said. When I check "update", a screen  drops down that asks that I enter my email address to continue........but i cannot find any way to do this.
    In the past, all I would do is check "update", and the update would take place. Since I upgraded to Mountain Lion, this has changed, and i do not know how to do this simple thing.......the app store shows an update is due to be updated, but i cannot find out how to do it.

  • HT5744 Anyone knows how to uninstall this update?

    Hi
    I want to uninstall this update from my system, (knowing security risk, doesn't care security if hardware doesn't work)
    I know that this update was compiled with a unestable and buggy Oracle Java version not RC, was beta and Apple put it like RC.
    Please how to uninstall this update?

    The Software update version is bonked, the latest bug fix is here for 10.6 users.
    https://support.apple.com/kb/DL1573
    Pasting: java -version into Terminal and pressing Enter should reveal this after the update which fixes the bug.
    java version "1.6.0_51"
    Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-10M4509)
    Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

  • The latest Firefox update, installed this morning 6/21/2011, disabled McAfee. After installation, a window appeared stating that McAfee was not compatible and couldn't be enabled. This is NOT ACCEPTABLE! Please let me know how to uninstall this update.

    The latest Firefox update, installed this morning 6/21/2011, disabled McAfee. After installation, a window appeared stating that McAfee was not compatible and couldn't be enabled. This is NOT ACCEPTABLE! Please let me know how to uninstall this update.

    Upgrade your browser to Firefox 8 and check
    * getfirefox.com

  • HT3421 How can use this update if I'm using the MAC OS X 10.7.5?

    How can I use this updater if I have already upgraded my MAcbook to the MAC OS X 10.7.5.?
    To run the update, it requires:
    Mac OS X 10.4.11
    Mac OS X 10.5.6

    Batteries with this information in the Battery Information section need this update:
    A device name "ASMB016" or "ASMB013" in the serial number
    A Pack Lot Code is 0002
    A battery firmware version of 0110 

  • How to automate this update statement

    Hello:
    I need to convert this update statement to a pl/sql procedure so that I can update this for each mk_product_id at a time because the primary update table has 80 million lines, If I do this for one mk_product_id is very fast, I need to update closely 2 million lines for month_id =55
    update processor a set a.mkrptqty =
    (select b.mkqty*p.rpt_conv_factor
    from
    processor b,
    product p
    where a.mk_record_id = b.mk_record_id
    and a.mk_line_nbr = b.mk_line_nbr
    and b.mk_product_id = p.part_code
    and a.mk_product_id = '480'
    and b.month_id = 55)
    where
    a.month_id = 55
    and a.mk_product_id = '480'
    Thanks,
    Mohan

    PL/SQL is slower than SQL.
    Keep your update as a single large update statement, but better correlate your inner select with your outer table:
    UPDATE processor a
    SET a.mkrptqty =
      (SELECT b.mkqty*p.rpt_conv_factor
         FROM processor b,
        product p
        WHERE a.mk_record_id = b.mk_record_id
      AND a.mk_line_nbr      = b.mk_line_nbr
      AND b.mk_product_id    = p.part_code
      AND a.month_id         = b.month_id
      WHERE a.month_id  = 55
    AND a.mk_product_id = '480';As you can see in the above code I correleated processor b completely with processor a from the outer update statement. But in the process noticed that you could probably completely dispose of processor b as noted below:
    UPDATE processor a
    SET a.mkrptqty =
      (SELECT a.mkqty*p.rpt_conv_factor
         FROM product p
        WHERE a.mk_product_id    = p.part_code
      WHERE a.month_id  = 55
    AND a.mk_product_id = '480';Please note that neither of these pieces of code have been tested as I don't have relevant tables at hand to test on.
    To update many mk_product_id's at a time just use the IN operator providing it with either a select list, or list of values:
    UPDATE processor a
    SET a.mkrptqty =
      (SELECT a.mkqty*p.rpt_conv_factor
         FROM product p
        WHERE a.mk_product_id    = p.part_code
      WHERE a.month_id  = 55
    AND a.mk_product_id in ('480','481');or
      WHERE (a.month_id, a.mk_product_id)
         in ((55,'480'), (65,'481'));or
      WHERE (a.month_id, a.mk_product_id)
         in (select month_id, mk_product_id from some_table where some_conditions = 'are met');Edited by: Sentinel on Sep 17, 2008 2:25 PM

  • HT1544 how long should this update take?

    I am intalling leopar 10.5 on my computer. It's been "intalling" for over 3 hours now. How long should this usually take if you intall it via DVD?

    Welcome to Apple Support Communities
    It shouldn't take that amount of time. What is the screen showing? Is the progress bar frozen? The only solution would be to restart your Mac, but it's better to first check what your screen is showing

  • How to tune this update statement?

    Hello,
    I have to solve the following task:
    Update every row in table A which has an appropriate row in table B and log what you have done in a log-table.
    It is possible that there are more than one fitting rows in table A for a row in table B.
    My first approach is looping over the table B and doing an update of table A for every entry in table B.
    This works and looks like this:
    Table A:
    PK number (This is the primary key of this table)
    KEY number
    Table B:
    KEY_OLD number
    KEY_NEW number
    Log table:
    PK number
    KEY_OLD number
    KEY_NEW number
    declare
      TYPE PK_TAB_TYPE IS TABLE OF number INDEX BY BINARY_INTEGER;
      v_tab_PK       PK_TAB_TYPE;
      v_empty_tab_PK PK_TAB_TYPE;
    begin
      for v_rec in (select * from table_B) loop
        v_tab_PK := v_empty_tab_PK;  /* clearing the array */
        update table_A
        set    KEY = v_rec.KEY_NEW
        where (KEY = v_rec.KEY_OLD)
        returning PK bulk collect into v_tab_PK;
        if (v_tab_PK.count > 0) then
          for i in v_tab_PK.first..v_tab_PK.last loop
            insert into TMP_TAB_LOG(PK, KEY_OLD, KEY_NEW)
              values (v_tab_PK(i), v_rec.KEY_OLD, v_rec.KEY_NEW);
          end loop;
        end if;
      end loop;
    end;Because the table B can have up to 500.000 entries (and the table A has even more entries) this solution will cause many update-statements.
    So I am looking for a solution which has better performance.
    My second approach was using an correlated update and looks like this:
    declare
      TYPE PK_TAB_TYPE IS TABLE OF number INDEX BY BINARY_INTEGER;
      v_tab_PK            PK_TAB_TYPE;
      v_empty_tab_PK PK_TAB_TYPE;
      v_tab_NewKey    PK_TAB_TYPE;
    begin
      v_tab_PK         := v_empty_tab_PK;  /* clear the arrays */
      v_tab_NewKey := v_empty_tab_PK;
      update table_A a
      set    KEY = (select KEY_NEW from table_B where (KEY_OLD = a.KEY))
      where exists (select 'x' as OK
                         from   table_B
                         where (KEY_OLD = a.KEY)
      returning PK, KEY bulk collect into v_tab_PK, v_tab_NewKey;
      if (v_tab_PK.count > 0) then
        for i in v_tab_PK.first..v_tab_PK.last loop
          insert into TMP_TAB_LOG_DUB(PK, KEY_OLD, KEY_NEW)
            values (v_tab_PK(i), null, v_tab_NewKey(i));
        end loop;
      end if;
    end;Now I have only one update statement.
    The only thing missing in this second approach is the old KEY before the update in the log table.
    But I have no idea how to get the old value.
    Is there a possibility to modify this second approach to get the old value of the KEY before the update to write it in the log-table?
    And now I need your help:
    What is the best way to get a performant solution for my task?
    Every help appreciated.
    Regards Hartmut

    Below is a script you can run in another testing schema to do the update with logging..... I have created the tables (A and B) with primary key constraints defined...
    create table table_a(pk number primary key
    , key number);
    create table table_b(key_old number primary key
    , key_new number);
    create table TMP_TAB_LOG_DUB(pk number primary key
    , key_old number
    , key_new number);
    ---------insert test data
    insert into table_a values(1,2);
    insert into table_a values(2,2);
    insert into table_a values(3,2);
    insert into table_a values(11,1);
    insert into table_a values(12,1);
    insert into table_a values(13,1);
    insert into table_a values(21,4);
    insert into table_a values(22,4);
    insert into table_a values(23,4);
    commit;
    insert into table_b values(1,3);
    insert into table_b values(4,2);
    commit;
    ----- insert to log
    insert into TMP_TAB_LOG_DUB(PK, KEY_OLD, KEY_NEW)
    select a.pk
    , a.key as key_old
    , b.key_new as key_new
    from table_a a
    join table_b b on a.key = b.key_old;
    ----- update table_a
    update(select a.pk
    , a.key as key_old
    , b.key_new as key_new
    from table_a a
    join table_b b on a.key = b.key_old)
    set key_old = key_new;
    commit;

  • HT202157 How long does this update take to load?

    How long does the new update take to load??

    I waited for over 12 hours and still did not download. My internet connexion is very fast. AppelTV seems to have gone on an endless loop: apple logo, blank screen, appel logo, etc. Can anyone tell me what I should do? I can't reset it, since I cannot get out of this loop. Any help, suggestion, will be greatly appreciated.

  • HT4117 How long does this update take?

    How long should the 10.7 SMC Firmware update take? I got the progress bar for the download and then the screen went black and the light pulsed as if my MacBook Pro were asleep. I waited fifteen minutes and nothing - no fan or other activity. I pressed the power button in a variety of ways (hold for thirty seconds and release - press once briefly - did this a dozen or so times) and now the light is on and the fan is running. It's been another nine minutes.
    Should I just be patient or is there a problem?

    Your iPhone 4 will be updated to iOS 7.1, that was improved thinking on iPhone 4 speed.
    How long it will take depends of your internet connection.

  • HT5704 How long does this update take to download?  Last time it was like 9 hrs

    Last time I updated an update from my Acer Netbook it took 9 hours. I was trying to find out if this normal or if I am doing something incorrectly. I have only had my phone since last fall

    The update is about 900 MB, and the download time is purely a function of your Internet connection speed. On my FiOS connection it takes about 5 minutes.

  • HT1222 how much does this update redu e battery life?

    how much battery life does iday update loose?

    An update is never designed to reduce battery life. A small handful of users complain about battery issues with every single update.

  • HT5704 how to download this update

    how to download ios 6.1.3

    If your iDevice is using a version of iOS lower than 5, you will need to use iTunes on your syncing computer to perform the upgrade. Use the Apple link below as a guide for the upgrade.
    http://support.apple.com/kb/HT4972

  • How to replace the update staement with a modify statement

    how to convert this update stat to a modify stat?
    Message was edited by:
            Ashwin A

    Hi
    MODIFY <DB TABLE> FROM <INTERNAL TABLE>
    To insert or change a single line in a database table, use the following:
    MODIFY <target> FROM <wa> .
    The contents of the work area <wa> are written to the database table <dbtab>. The work area <wa> must be a data object with at least the same length and alignment as the line structure of the database table. The data is placed in the database table according to the line structure of the table, and regardless of the structure of the work area. It is a good idea to define the work area with reference to the structure of the database table.
    If the database table does not already contain a line with the same primary key as specified in the work area, a new line is inserted. If the database table does already contain a line with the same primary key as specified in the work area, the existing line is overwritten. SY-SUBRC is always set to 0.
    A shortened form of the above statement is:
    MODIFY <dbtab>.
    In this case, the contents of the table work area <dbtab> are inserted into the database table with the same name. You must declare this table work area using the TABLES statement. In this case, it is not possible to specify the name of the database table dynamically. Table work areas with the same name as the database table (necessary before Release 4.0) should no longer be used for the sake of clarity.
    Reward points if useful
    Regards
    Anji

Maybe you are looking for

  • Delete blank records from the cube

    Hello; We just upgraded from 3.5 to 7.0.  When we started running our queries for the Inventory cube, we were getting an error message of "Error:  The validity interval has the initial value as lower limit". When I checked the cube, I found records t

  • Use of field EINDT - Initial Entry & Feature ENTRY in IT0016

    In which way we can use feature ENTRY ? Thanks in advance

  • Create a new table using repeating rows

    Hi all, My team members are entering data into the below shortened table. I want to import this table to my model (a different excel file), but I need to manipulate the data in order to use it. The team members table (MaterialTypeTbl) looks like: For

  • Get directory of a file

    hi, am programing with java applet, and there's a method getDocumentBase() which returns the full URL. however i just need the directory where the file resides, not the file name. i.e., i want d:/this/is/the/dir/ instead of d:/this/is/the/dir/applet.

  • How do I keep stroke from spilling onto next page?

    My InDesign document has a few strokes that are on 45 degree angles and I'm trying to keep them from spilling onto the next page. I can't send them to the back because that won't work in this instance. Is there a way to keep them from showing on surr