update with case

How do update with different conditions

Student UPDATE

SET status = 'yes '.

UNIV_NUMB = ' 222 -"

where id = '112233456'

AND YEAR = ' 2014 "

case

When APPLICATION_RESULT = 'C '.

Then)

"CONFIRMED = 'Y').

When APPLICATION_RESULT = 'F'

Then)

"CONFIRMED = 'N')".

end

Hello

Maybe you want something like this:

Student UPDATE

SET status = 'yes '.

ID WHERE = '112233456'

AND year = '2014' - is this really a string?  Why?

AND ((application_result = 'C'

AND confirmed = 'R '.

)

OR (NVL (application_result, 'X') <> 'C')

AND confirmed IS NULL

)

)

;

I hope that answers your question.

If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.

If you ask on a DML statement, such as UPDATE, the sample data will be the content of the or the tables before the DML, and the results will be the State of the or the tables changed when it's all over.

Explain, using specific examples, how you get these results from these data.

Always say what version of Oracle you are using (for example, 11.2.0.2.0).

See the FAQ forum: https://forums.oracle.com/message/9362002

Tags: Database

Similar Questions

  • Update query with case

    my table: workingdate

    SNO name startdate
    1 ss 12/01/2011
    2 bb 11/01/2011


    I can update name or date start or two .i will pass a new date, name of update through front end.

    I need to validate the condition in the event, that is when the new date after check if it is higher, then start date. If it is higher, then it should be updated with the new start date.
    If not, it must be updated, it will be the old value.

    I use it under request

    Update workingdate set name = 'sss', startdate =)
    case
    When
    (TO_DATE('2011-12-10','yyyy-MM-dd') > (select TO_DATE(startdate,'yyyy-MM-dd') from the workingdate, when sno = 1))
    then TO_DATE('2011-12-10','yyyy-MM-dd')
    on the other
    Select TO_DATE(start_date,'yyyy-MM-dd') in the workingdate, when sno = 1
    end
    )
    where sno = 1;


    but when I run the above query, it shows me


    Error report:
    SQL error: ORA-00936: lack of expression
    00936 00000 - "missing expression.
    * Cause:
    * Action:

    How could I solve this problem...

    Check this

    UPDATE workingdate
    SET NAME='sss',
         startdate=(CASE WHEN (TO_DATE('2011-12-10','yyyy-MM-dd') > startdate THEN TO_DATE('2011-12-10','yyyy-MM-dd') ELSE start_date END)
    WHERE sno=1;
    

    See you soon
    Kanchana

  • How can I update with a version without losing any data?

    I have a ZTE open regularly update with custom versions. Whenever I do this, I lose all my data on the phone, like contacts, applications installed in the store of market parameters (including wireless and send the parameters).

    All these data and recovery each time settings is extremely annoying. Is there a way to not lose in the process or to save them and repristining them later?

    Hi Enrico,.

    I know that for import/export of contacts, you can use the following commands:

    • to export contacts (excerpt):
    adb pull /data/local/indexedDB/chrome db
    

    This will store all the data of your device in a folder (in this case, called db) that is created when you opened your shell.

    • to restore (push) back of the unit:
    adb push db /data/local/indexedDB/chrome
    

    Following Github repository offers other tools and scripts for flashing, restore and backup of Gaia:

    I just tried to backup/restore a few times in the past, but it did not work as expected. Feel free to test them with caution. =)

    Thank you!!

    -Ralph

  • Calendar and Contacts to stay up-to-date on all of my devices.  Now the iPad does not synchronize or update with others.  Any ideas?

    Before the latest IOS update, calendars and contacts on all devices remained the same.

    Now, the ipad only synchronizes with other devices if a change is made on the iPad.

    IPad will not update the case.

    IPad 4, IOS 9.3.1.  Any ideas?

    On the iPad

    Disconnect from the iCloud

    Sign up to find iPad

    Force restart the iPad

    Reconnect to all of the above

  • Why my computer updated with (KB970158) today?

    Why my computer updated with (KB970158) today? Downloaded and installed with on my promise. I had my windows update set to check for updates but let me choose whether to download and install them BUT it work around my settings and installed in any case this has never happen before why it does this and how to stop it. Now I have windows update set to never search for updates

    Did you upgrade or install a driver?  The Synaptics drivers cause this. As far as I know, it is caused by a driver installation program by ensuring that the driver is the correct version. The "update" is contained in the driver package.

    The man who designed the framework pilot crashes on this forum:

    http://social.msdn.microsoft.com/Forums/en-ZA/wdk/threads . You can try asking there.

    Disable Windows update will not affect this.

  • Why is-2 slashes after domain name now, when you publish a live site after the new update with Muse? Post also after the site he has these 2 slashes before 'index.html '.

    There are 2 slashes after domain name now, when you need to publish a live site after the new update with Muse?

    -It was always a slash after the domain name. And if BC publication the

    site - it has also these 2 slashes before "index.html" - is this correct? - or something wrong?

    slash.png

    Hi erinb61521593,

    I did some tests at my end and can confirm that it is a known problem with the latest version of Muse but I advise you to choose the option with the / / at the time of release as it will download your site in good folder on the servers of BC (that points to your domain name) and after publishing the site if you go to the url with single / it works perfectly.

    We already noted this problem with the developers of muse and I don't know that it will be fixed in the next version of Muse.

    Feel free to reply to this post, just in case I missed something or if you have any other doubts about this.

    Kind regards

    Vivek

  • When I add a playlist to my library, it automatically updated with new songs?

    Hello world

    When I add a playlist to my library, for example a list of music playback from Apple which is regularly updated by the editors ("Best of the Week" or 'Hits of today', for example), did the playlist in my library automatically update with new songs, when new songs are added?

    Thank you in advance.

    Hello, take a look at this article If you see not your entire library after you update iTunes on your Mac or PC - Apple Support

  • Restrictions does not not after ISO put 10.0.1 update with the new iPhone 7

    Restrictions does not after ISO put 10.0.1 update with the new iPhone 7 any which option of ranking app I don't choose no changes are made.  All the patches?

    Thank you

    Hello Launcher,

    Thank you for bringing your question about Restrictions here in Apple Support communities. My understanding of your question is that you change the Restrictions, but no change is noticed. I tried the same on my iPhone 6 Plus running iOS 10 and noticed a similar situation. Please allow me the opportunity to explain how the Restrictions is designed to work. First, I put my limitations for applications, do not allow Apps and together 4 +, which basically means everything beyond 4 + will be blocked from buying. Then I went to the App Store and the first app that caught my attention was NCIS: hidden crimes. This app is rated 12 + and is definitely an application I would not want my toddler to help. It is that Restrictions come into play. When I type on NCIS: hidden Crimes, the Get option is grayed out. Restrictions does remove all apps, songs, books, etc. from view, but it will prevent the purchase, download, and install all applications rated above the setting you choose when you set up restrictions. It's the help article that discusses the Restrictions and prevent purchases: Use Restrictions in order to avoid buying on iPhone, iPad, or iPod touch.

    I checked on the restrictions help articles, and I understand where it can be a bit confusing. In the help article Use Restrictions on iPhone, iPad and iPod touch, it says "You can use Restrictions, also known as parental control, to block or limit specific applications and features on your iPhone, iPad or iPod touch." This means in fact that apps, features or services (rated above that helped you, or if you have turned off completely) can he no longer appears on the device if the restriction is activated and starts blocking them. I also tested this by activating Restrictions and turned the cursor for Safari to off. When I went back to the home screen, Safari doesn't show any more and I could no longer use it.

    I hope this helps to clarify how the Restrictions. If my understanding of the issue was not accurate to the issue that you are experiencing, I will be happy to pursue this issue with you. Please indicate exactly what you took measures, and what expectations you had or the some restrictions, applications, features, or services you are restricted. Thanks again and have a great rest of your day!

  • iPhoto did not update with 10.11

    the OS X 10.7 in 10.11, iPhoto is grayed out. When I was invited to be updated manually, I thought it was 'bought' under another ID. He was "bought" at the same time and installed at the factory.

    Mac OS X 10.10.3 and newer include Photos, which is designed as a replacement for iPhoto and can import library. If you want to go on the use of iPhoto in addition to or instead of switch to Photos, click here and try following the instructions; you will only be able to do if you have previously associated with iPhoto with the Mac App Store.

    iPhoto is not intended to and does not update with Mac OS X, even if it was originally shipped with the computer.

    (143201)

  • Just updated Firefox to update with new rounded tabs... How can I switch to old square tabs?

    Just updated Firefox to update with new rounded tabs... How can I switch to old square tabs?

    Many of us use

    Restorer Classic theme (Customize Australis)

    Restore the tabs squared, appmenu, modules, small display bar icons and more on Australis UI (Windows/MacOSX/Linux + Fx 29 +).

  • my iphone 5 c opens more after that I was invited to be updated with itunes. now, the display shows only itunes usb cable and logo. read some tips here, but nothing happened. any help will be much appreciated.

    My iPhone 5 c opens more after that I was invited to be updated with iTunes. now the display shows iTunes logo and the USB cable. I have read and applied some tips here, but nothing happened. Any help will be much appreciated. Thank you.

    https://discussions.Apple.com/message/30014877#30014877http ://

    Read the post from sierrawren . It helped me to fix my phone. Now it works perfectly fine. Hope it can help others too.

  • Satellite L50 - B - 23F Freeze After AMD Catalyst update, with 10 Windows

    Hello world
    I just updated with the latest AMD catalyst drivers downloaded from the internet, Windows 10.

    After the computer restarts, I noticed that it takes a long time to turn on.
    I have tryied to uninstall and reinstall these drivers, but with no result, the only result is that the pc at the moment does not at all.
    There is no way to reset the pc, because the windows BIOS is not shown.
    It only flashes the led 'NUM LOCK' and nothing else, there is no answer for every keypressed on the keyboard.

    How can I make it work again? If not, how can I save the data from my HARD drive?

    Thanks to advice.

    Looks like the BIOS corruption, were you by changing the BIOS settings when shooting problems? Did you uninstall the drivers of your firmware? You may need to flash to your laptop with a file of crysis recovery. And sometimes, there is no guarantee of operation. You can try a BIOS reset first, remove your dough and unplug the unit, hold down the power button for a minute without letting go of taken, then plug the device with the battery and turn it on. Is anything being displayed on the screen? You can repeat this process but hold the Fn + ESC key before you plug in the power cable and turn it on then still hold Fn + ESC. What are the results?

    If it does not, then you need to find the BIOS for the online of the file system and then your flash system, need a BIOS compatible with a version equal or superior to your.

  • IBooks on ipad pro crash after IOS updated with 9.3.1.please

    IBooks on ipad pro crash after IOS updated with 9.3.1.please

    I have the same problem after update 9.3 OS on my Ipad 2... Crashing in IBooks. PDF and missing books. I have access to my books for about a minute before it crashed.

    It still occurs with the 9.3.1 update.

    I don't really know where to go then except put it there the 9.3.1 upgrade did not fix my problem.

    Thinking that I might have to consider for an Apple Tech which is an expense I really don't think I should have to bear, because I did not cause the problem that everything worked fine with my iBook before upgrading the OS 9.3.

    Thank you

  • Change a message not updated with new message corrected even on the last update of Skype

    When you edit a message, Skype is not updateing with the corrected version of the message. It was happing in the previous and updated versions to current day. Few people in my organization have reported this as well. Any ideas? Thanks in advance

    This is a known bug in the latest version of Skype 7.17. You can uninstall this version and install the older version of Skype 7.16.0.102 using this Setup program:

    http://download.Skype.com/MSI/SkypeSetup_7.16.0.102.msi

  • Ugggh.  I have a 27-inch iMac late 2011 and the hard drive was updated with a new SSD.  The integrated cd/dvd had to be taken out.  I then bought a thought of superdrive, it should work.  It's frozen on my iMac!

    Ugggh.  I have a 27-inch iMac late 2011 and the hard drive was updated with a new SSD.  The integrated cd/dvd had to be taken out.  I then bought a thought of superdrive, it should work.  It's frozen on my iMac!  Gee, who could have possibly guessed that would happen?  I tried all kinds of silly workarounds, I found on the internet, but still it will not register the stack of DVDs and other discs I have.

    If you're like me and upgraded your iMac that came with a cd/dvd drive internal... so he has to come out to give way to the fusion or the SSD drive, do NOT buy the apple superdrive.  It will work with your computer!

    Think I'll get a laptop samsung...

    Ironic, isn't it? Own Apple SuperDrive will not work with Apple computers. Shame you don't check here first that we would have warned you. Return Apple overpriced and buy a nice third-party player for a third of the price. I love the LG units. You can consider a loading plate because they are more reliable, and you can use these pesky disc when you get one.

Maybe you are looking for