Please confirm the update

CREATE TABLE TMP(CODE VARCHAR2(5), ID VARCHAR2(5))
INSERT INTO TMP VALUES('0','1')
INSERT INTO TMP VALUES('000','0')
INSERT INTO TMP VALUES('006','0')
INSERT INTO TMP VALUES('006','1')
CREATE TABLE MAIN(CODE VARCHAR2(5), ID VARCHAR2(5), DC NUMBER)
INSERT INTO MAIN VALUES('0','1',0)
INSERT INTO MAIN VALUES('000','0',0)
INSERT INTO MAIN VALUES('006','0',0)
INSERT INTO MAIN VALUES('006','1',0)
INSERT INTO MAIN VALUES('006','3',0)
INSERT INTO MAIN VALUES('006','4',0)
INSERT INTO MAIN VALUES('0','4',0)
INSERT INTO MAIN VALUES('8','1',0)
I want the column DC to be null in main table for all those ids and codes in tmp table
I gave this:
update main AA set AA.DC = null
where AA.CODE IN (SELECT CODE FROM TMP )
AND AA.ID IN (SELECT ID FROM TMP )
it does give 4 rows updated, but this is just example, i am working on a much bigger table with thousands
of rows, i want the actual combination of id and code to be updated..
example, there may be thousands of rows with id as 1, and code not in 0 and 006, they should not be updated
eg: 8,1,0 row in main table should not be updated/.
will the above update do ?

Just confirming a bit here ;) :
MHO%xe>  select * from tmp;
CODE  ID
0     1
000   0
006   0
006   1
4 rijen zijn geselecteerd.
Verstreken: 00:00:00.29
MHO%xe> select * from main;
CODE  ID            DC
0     1              0
000   0              0
006   0              0
006   1              0
006   3              0
006   4              0
0     4              0
8     1              0
8 rijen zijn geselecteerd.
Verstreken: 00:00:00.37
MHO%xe> update main
  2  set dc = null
  3  where ( id, code ) in ( select id, code
  4                          from tmp
  5                        );
4 rijen zijn bijgewerkt.
Verstreken: 00:00:00.96
MHO%xe> select * from main;
CODE  ID            DC
0     1
000   0
006   0
006   1
006   3              0
006   4              0
0     4              0
8     1              0
8 rijen zijn geselecteerd.
Verstreken: 00:00:00.06
MHO%xe> rollback;
Rollback is voltooid.
Verstreken: 00:00:00.12
MHO%xe> update main a
  2  set a.dc = null
  3  where exists ( select null
  4                 from   tmp b
  5                 where  b.id = a.id
  6                 and    b.code = a.code
  7               );
4 rijen zijn bijgewerkt.
Verstreken: 00:00:00.15
MHO%xe> select * from main;
CODE  ID            DC
0     1
000   0
006   0
006   1
006   3              0
006   4              0
0     4              0
8     1              0
8 rijen zijn geselecteerd.
Verstreken: 00:00:00.06
MHO%xe> rollback;
Rollback is voltooid.
Verstreken: 00:00:00.03
MHO%xe> update main aa
  2  set    aa.dc = null
  3  where  aa.code in (select code from tmp )
  4  and    aa.id in (select id from tmp );
4 rijen zijn bijgewerkt.
Verstreken: 00:00:00.21
MHO%xe> select * from main;
CODE  ID            DC
0     1
000   0
006   0
006   1
006   3              0
006   4              0
0     4              0
8     1              0
8 rijen zijn geselecteerd.
Verstreken: 00:00:00.06
MHO%xe>

Similar Messages

  • HT4623 How can I update my iphone 4 from iOS 5.1.1 to iOS 6.1.4 only.  I am not looking for iOS 7 right now.  Please suggest the update process?

    Hi Team,
    I have iphone4 16GB with iOS 5.1.1.  While using the phone, few times the phone is automatically going to shutdown and getting call disconnected.  Some times, it happens more frequently in a day, sometimes not. 
    and also, How can I update my iphone 4 from iOS 5.1.1 to iOS 6.1.4 only.  I am not looking for iOS 7 right now.  Please suggest the update process?

    You cannot. You can only upgrade to the currently supported version of the iOS which, at this time is iOS 7.0.2.

  • Dear Sir/Madam,  Adobe acrobat claims that there is an update. However the update process is very flaky and unreliable. Very poor service, with useless update prompts.  System report is attached.  Please fix the update, before advertising useless prompts

    Dear Sir/Madam,
    Adobe acrobat claims that there is an update.
    However the update process is very flaky and unreliable.
    Very poor service, with useless update prompts.
    System report is attached.
    Please fix the update, before advertising useless prompts for updates, for paid versions.
    Thanks

    Nothing is attached.
    You should also be aware that there are a number of scams and malwares claiming fake updates.
    Please post your report and tell us exactly what product and exact version you have.
    And be aware you aren't talking to Adobe.

  • Content generation error. Please confirm the file can be opened in InDesign?

    I have been trying to upload a couple of files to a folio that was built yesterday, everytime I try to upload one of them I recieve the error message "Content generation error.Failed to open the InDesign file. Please confirm the file can be opened in InDesign." I have no idea why this is happening as one of the files was successfully uploaded to the folio yesterday and I have not made any changes to it since. I have a also restarted and trashed InDesign preferences so there are no problems there. If anyone has any answers or has experienced any similar problems could you please let me know.
    Thanks
    Adam Flanagan

    That was the first thing I tried because obviously I wanted to find out if it was a problem with my file or a general issue with all uploads to that folio. It seems to be working ok now, although I still have no idea what the problem was and I have never seen that error message before :s
    Thanks for your response.
    Adam

  • I can't make or receive calls or sms on my iphone 4s!!!! Do something. I have ios 5.0.1 on it. Please release the update or do smth!!

    I can't make or receive calls or sms on my iphone 4s!!!! Do something. I have ios 5.0.1 on it. Please release the update or do smth!!

    Nope, nothing I can do.
    I do not plan to ever release an update either because like everyone else here I am just a user like you.
    Apple is not here, does not read these forums or respond to anything posted here.

  • TS4124 I have noticed an imatch icon that is a cloud with an arrow, please confirm the meaning as I don't want to assume.

    What is the iMatch icon that is a cloud with an arrow pointing down. Please confirm as I don't want to assume before I delete files.

    .a4p is an Authorware v.4 (Windows) project.
    Interesting you have it as a .pkg...usually that's a published-on-a- Mac extension, if I recall.
    At any rate, can you put the file up on a Box, Dropbox, FTP, etc...and send me a URL?
    I should be able to published it so you can view the project (it would be an .exe).
    It can't be converted to anything though - not without manual effort.

  • Designjet 5500 Can anyone please confirm the meaning of error code 0021 on calibration. Many thanks

    Help Please

    This forum is focused on consumer level products.  For the Designjet you may have better results posting in the HP Enterprise Designjet forum here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Guys, a little help please with the update :)

    Dear my Nokia user friends!
    Can you guys give me some advices about updating my Nokia 6300 via internet??? What do you think, shall I update it? Is it safe (the main questin)? And what will I have new if I update it?
    Thanks guys, I trust yall.. I can't wait to get your replies
    Message Edited by dog4life on 06-Mar-2008 05:30 PM
    Rottweilers are reloaded guns wich can be shot automaticly any second.. "Think about it"

    Hi dog4life
    Unfortunately there is always a chance that updating using Nokia Software Updater will fail necessitating taking your device to a Nokia Care Point. On the Online Software Update Attempt History it has a lovely way of recording this event as "Failed update attempt - User aborted software update from the recovery dialog(92)". Whereas there are usually no problems if using software as a clean installation on PC, in a number of situations there are remnants of previous events left in registry which can conspire to cause problems.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Please fix the update!!! Why is this taking so darn long????

    Glad to see it's not just me but still this is very frustrating. Is anyone trying to fix this?

    Hello, it's Mike from the Revel team.  Many of us continued working today, the July 4th holiday, to resolve this issue.  It has not been resolved yet, but we continue to work on this issue.
    I am sorry that your use of Revel has been disrupted.  I personally use Revel to share my family photos, so I know what this disruption feels like.
    I can assure you that your photos are safe in the Revel cloud.  And as we have mentioned in other forum posts, you can access your photos from www.adoberevel.com, from the Revel Mac app, the Revel Android app or the Revel Win 8 app.  I know that this may not immediately help you, but in wanted to let you know that your photos are safe.  We hope to have this resolved as soon as possible.
    Thanks,
    Mike from the Revel team
    mabbott@ adobe.com

  • Please fix the Update Button and Update all

    this looks like bug

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, or by a peripheral device.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Post for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.  The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • Hi Attempting to update my card but keep getting this notice........................."We cannot verify the address that you've entered. Please confirm that you still wish to use this as your billing address, or return to your  billing form to edit your en

    Hi Attempting to update my card but keep getting this notice........................."We cannot verify the address that you've entered. Please confirm that you still wish to use this as your billing address, or return to your  billing form to edit your entry" and my billing My address is correct??@

    The card got declined on September 18th, please contact bank to get the exact reason. The billing details that we have is messaged to you, please confirm the address ,
    The CC is suspended as of now.
    Regards
    Rajshree

  • When trying to update my CC apps, the update fails. I get this error: Update Failed. There was an error installing this update. Please try again later or connect customer support. This is currently happening for InDesign, Photoshop and Bridge. I had this

    When trying to update my CC apps, the update fails. I get this error: Update Failed. There was an error installing this update. Please try again later or connect customer support. This is currently happening for InDesign, Photoshop and Bridge. I had this problem previous and was able to fix by doing a complete wipe of my computer and reinstalling CC. However, I should not have to wipe my computer clean everytime I need to do a CC update. HELP!

    Hi,
    Please download the updates directly from the link below:
    WIN: All Adobe CC 2014 Updates: The Direct Download Links for Windows | ProDesignTools
    MAC: All Adobe CC 2014 Updates: The Direct Download Links for Mac OS | ProDesignTools
    Regards,
    Sheena

  • How to use the update mechanism in Photoshop CS10 for Camera Raw?

    Good Evenning!
    I would like to open .NEF files with Adobe Photoshop CS10 (RAW for Nikon D5200) but my version of Camera Raw is too old.
    I need at least the 7.3 version.
    When I try to download it, I have this message: Please use the update mechanism in Photoshop CS10 for Camera Raw. But how?? When I go to "Help" tab, to "Updates", it says that no update available.
    Can please someone help me?
    Thanks a lot!!
    Kinds Regards
    Vanessa

    Which version of photoshop or photoshop elements are you using?
    Which operating system?
    There is no such version as cs10.
    Do you mean photoshop shop elements 10?
    If you go to Help>About Photoshop Elements (windows) or Photoshop Elements Editor>About Photoshop Elements (mac), that should tell you which version you have.

  • What can I do if I can't get the update page uploaded on the App Store

    I have shut the iPad all the way down and I don't know what else to do. PLEASE HELP.

    The update server is down; try this temporary workaround
    App Store>Purchased>Select "All"
    Note: Look out for apps that have the word "Update"
    http://i1224.photobucket.com/albums/ee374/Diavonex/9c256282736869f322d4b3071bbb2 a82_zps51a6f546.jpg

  • Is it safe to update my iPhone 4 16gb Softbank Locked to the latest OS? I'm hesitating to update its OS because I heard it might be permanently locked and I can't use it even as an iTouch. Please confirm!

    Is it safe to update my iPhone 4 16gb Softbank Locked to the latest OS? I'm hesitating to update its OS because I heard it might be permanently locked and I can't use it even as an iTouch. I understand that Softbank locked iPhone can never be unlocked, but not using this as a phone. I'm using this as an itouch.
    Please confirm if I can update its OS? or what happens when i Update its OS.

    If you are just using the device as an iPod touch, it won't matter if you update it, so long as you still have a Softbank SIM in the device. It doesn't have to be active, but you will need it to activate the device after you update the firmware. It won't be locked to where it cannot be used as a Touch, unless you consider not activating it, but that is something you can still do.

Maybe you are looking for