Can I combine these updates?

Hi,
I wondered if there was a way to combine the two update statements below into one statement?
Basically the queries are the same, but I just want to update the column with a different value depending on the value of t2.name
UPDATE mydetails
SET    col1= decode(col1, null, null, 1)
WHERE  (col2, col3) in                              
      SELECT     
           t3.value
          ,t3.id
      FROM   
           t1     
          ,t2             
          ,t3   
      WHERE  
          t1.id     = t2.id
      AND t1.id  = t3.id
      AND     t2.Name          <> 'NOENTRY'       
UPDATE mydetails
SET    col1= decode(col1, null, null, 999)
WHERE  (col2, col3) in                              
      SELECT     
           t3.value
          ,t3.id
      FROM   
           t1     
          ,t2             
          ,t3   
      WHERE  
          t1.id     = t2.id
      AND t1.id  = t3.id
      AND     t2.Name          = 'VERIFIED'       
);Many thanks.
Edited by: skulls on 13-Jul-2010 21:43 Copy and paste error

When update table using other table's values,
merge statement is often more useful than update statement.
I can use both merge statement and update statement B-) B-) B-)
I always choose one.It depends on which is useful to solve update table problems B-) B-) B-)
There is the good news.
You can rewrite below simpler one.
Because when a.col1 is null you do NOT have to update.
merge mydetails a
using(SELECT 
         t3.value
        ,t3.id ,t2.Name
     FROM   
         t1
        ,t2    
        ,t3   
     WHERE  
        t1.id   = t2.id
     AND t1.id  = t3.id
     AND    t2.Name !='NOENTRY') b
on (a.col2=b.value and a.col3=b.id and a.col1 is not null)
when matched then
update set a.col1 = case when b.Name = 'VERIFIED'
                         then 999 else 1 end;

Similar Messages

  • How can I combine these two DAQ tasks???

    I am using LabVIEW 11, Windows XP, cDAQ-9174 chassis, two NI-9205 modules.
    Please see my code for reference. I am very new so i will accept all suggestions.
    I am acquiring 12 volatage signals in a producer/consumer structure giving me a queue of 1-d array of waveform(dbl). Then I am acquiring 12 voltage signals in another loop giving me 2-d array of waveform(dbl).
    There is an issue creating the channels. How can I combine these two tasks?
    Thanks,
    ~Chris
    Attachments:
    WaveTest_6.2.vi ‏558 KB

    Hello chrisbe723,
    When you say that there is an issue creating the channels, are you getting a specific error message when running your code? Also are you referencing the same set of channels for the two DAQ task you are configuring?
    Paul-B
    Applications Engineer
    National Instruments

  • How can I stop these update notices?

    I keep getting told that there are software updates, but when I go there, it is something I don't need. For example, I keep getting told that there is a digital camera RAW compatibility update. I don't need this, as I don't even have a digital camera. However, if I don't update, it just keeps telling me, so I just update and it goes away, for a while.
    I used to be able to stop this by setting the system to ignore these updates, but it seems I can no longer do that. Is there anything I can do about it?

    Imp68 wrote:
    You must have a special version of mountain lion, because I'm not getting them every other day, or even near that.
    http://www.macobserver.com/tmo/article/hide-a-software-update-in-os-x-mountain-l ion
    The OP may have his Software Update setting in System Preferences set to automatically check for updates.
    Advice to OP, accept the software updates if you want your system to continue running well.

  • Several times a month, when I go to open Firefox, it says "wait installing new updates". After they are installed, Firefox won't open, it says "page not found." I have to then reload Firefox. How can I stop these updates?

    Before Firefox open the little window opens saying"wait installing new updates." Then after when opening Firefox, my home page says "can't find this page. I have plugged in the address: http://www.google.com/firefox?client=firefox-a&rls=org.mozilla:en-US:official and it Firefox still won't open. I have to run the Firefox setup 3.6.3 on my desktop, to get Firefox to open on my home page. I would like to stop these automatic Updates from running; how?

    Unfortunately I tried that and it didn't work. Thanks for the help though. I tried to uninstall and it said I couldn't because the file is corrupt or something, but I think I finally got it uninstalled and/or deleted or whatever, but now I try to reinstall/download it again from the beginning and I can't. No matter what I do I can not get Firefox working again. No matter how many times I try to redownload it. Any other suggestions?

  • I've been importing all my old CDs into itunes but one of them which was unknown imported as single tracks. How can I combine these into one album

    I've been importing all my old CDs into itunes but one of them which came up as unknown has imported as single tracks named track 1, track 2 etc. It wasn't an obscure CD (Paul Carrack - the journey so far) but not one that's available in the itunes store. I've manually changed the track names but they all appear as single tracks in the "Albums" section. Is there a way to put them all into an album to show up as an album with the other albums. Other "unknown" CDs I imported have imported with the correct track names but just don't have the album artwork so I don't understand why this one is behaving totally different?

    If you select the tracks all together in iTunes/ Songs then go to File/Get info you will be asked "Are you sure you want to edit information for multiple items?" Go ahead and you can make them into an album, putting in the artist name, etc.

  • I have two Apple ID Accounts. How can I combine them so I can simplify updates and purchases?

    I have two Apple ID's (accounts). How can I combine these accounts into one so I can simplify updates and purchases?

    Sorry, but Apple IDs/iTunes Store accounts cannot be merged.
    Regards.

  • HT203167 Single CD to ITunes creates several albums. How can I combine to get album back together

    Transferring a single CD to ITunes, I get 2 or 3 'albums', a couple containing only one or 2 songs from the CD. How in ITunes can I combine these separate 'albums' to get the complete album back under one? Or what do I need to do in "import" set up to make sure CD is imported as an album rather than by artist?

    Generally all you need to do is fill in an appropriate Album Artist. For more details see my article on Grouping Tracks Into Albums, in particular the topic One album, too many covers.
    tt2

  • Can I combine single appointment 1, 2, 3 to one recurring appointment in outlook?

    I schedule three single appointment from outlook from calendar, can I combine these single appointments to one recurring appointment by outlook API?

    Hello Xian,
    The Outlook object model doesn't provide any direct method for combining existing appointments into a series. You need to use the
    GetRecurrencePattern method of the AppointmentItem class to set up
    a RecurrencePattern object
    that represents the recurrence attributes of an appointment. If there is no existing recurrence pattern, a new empty RecurrencePattern object is returned.
    Thus, you can choose the first appointment item on the calendar and set up its recurrence pattern, then you will need to delete old two appointments.
    Here is what MSDN states for recurrent appointments:
    When you work with recurring appointment items, you should release any prior references, obtain new references to the recurring appointment item before you access or modify the item, and release these references as soon as you are finished and have saved
    the changes. This practice applies to the recurring AppointmentItem object,
    and any Exception or RecurrencePattern object.
    In C#, explicitly release the memory for that object (see ReleaseComObject method of the Marshal class).
    Note that even after you release your reference and attempt to obtain a new reference, if there is still an active reference, held by another add-in or Outlook, to one of the above objects, your new reference will still point to an out-of-date
    copy of the object. Therefore, it is important that you release your references as soon as you are finished with the recurring appointment.

  • When i update to the latest version (7.0.3), there is a message appear to me when i open any application that contains notification such as (What'sApp or BBM),this message said (Connect to iTunes to use push Notification),How I can to stop these message?

    When i update to the latest version (7.0.3), there is a message appear to me when i open any application that contains notification such as (What'sApp or BBM) , this message said (Connect to iTunes to use push Notification) , How I can to stop these messages that appear to me constantly?

     Hi,
    One of my ex-colleagues has installed a NI-DAQ 6.5 in our system. [And I do not see any other naitional instruments card in the CPU of the computer, may be he removed it] I deleted the account and all his files in the system. When I am trying to install version8.0, its not getting installed and giving me a message that I should uninstall the previous version by going to Add/Remove programs in the control panel.
    I tried doing that, but the "Change/Remove" button does not seem to work...[There is no response and so unable to install the new version...]
    Any idea how can this problem be solved?
    It is a windowsXP operating system with SP2 installed on a machine with P4 processor.
    Thanks

  • I have an old apple id that i havent used for years. For some reason i have updates on my mac i cannot do unless i sign onto that old account. It uses an old e mail account i no longer use or have access to. How can i get to do these updates?

    I have an old apple id that i havent used for years. For some reason i have updates on my mac i cannot do unless i sign onto that old account. It uses an old e mail account i no longer use or have access to. How can i get to do these updates?

    its very specific.
    If you are seeing the old Apple ID with regard to this Mac, then it would seem that somehow you have incorporated the ID in the setup of this new Mac.
    Iphoto i use never used imovie.
    If you began using iPhoto without having Accepted it into your Apple ID, then that would explain why you are unable to update the app. If any of the iLife apps are used without Accepting them into your Apple ID, the ability to accept them will lapse and you will not be able to update them.

  • Thunderbird automatically updated to version 24.6.0. It deleted all of my saved emails without warning me. Can I recover these????

    How can I recover these saved emails???

    It was like I was starting Thunderbird for the first time. Created the new accounts, although it did pull all the account information over. Just upset that it didn't warn me to back up everything. Had several important emails sitting in my inbox. Went to open Thunderbird and got the message of "Please wait, installing updates". When it opened everything was gone......

  • I had saved my pictures on iphoto, when I updated to OS X Yosemite iphoto has been deleted, I can't find these pictures or iphoto. How do i get these pictures back?

    I had saved my pictures on iphoto, when I updated to OS X Yosemite iphoto has been deleted, I can't find these pictures or iphoto.
    Do I download it again?

    Did you Update I Photo from MacApp Store to.9.6 as shown in screenshot.

  • HT1766 all my contacts have been deleted from an update. how can i get these restored?

    all my contacts have been deleted from an update. how can i get these restored?

    The iphone is designed to be synced to your computer regularly.  Your contacts will be in whatever program ( outlook, address book, etc) that you have been synxing.  Sync them back.
    If you have failed to sync them, then they are likely gone.  You can try restoring from backup.

  • I want to install Photoshop/bridge on a new Mac.  Can I transfer these apps from my old mac? Can I get an update installed on my new Mac?

    I want to install Photoshop/bridge on a new Mac.  Can I transfer these apps from my old mac? Or can I get an update installed on my new Mac?

    Do not transfer.  Install using installation files.  If you need to you can download most older applications thru the following page...
    Download and Installation Help -
    https://helpx.adobe.com/download-install.html

  • AppStore displays permanently an update avaible and there is none really, how can I solve these little problem?

    AppStore displays permanently an update avaible and there is none really, how can I solve these little problem?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Sync with iTunes
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    I myself would live with it before doing the following 
    - Restore to factory settings/new iOS device.

Maybe you are looking for

  • It takes long time to load the parameter's value when running we run report

    Hi, It takes long time to load the parameter's value when running we run report. What could cause this? How to troubleshoot the behavior of the report? Could I use Profile and what events should i select? Thanks

  • Calendar alerts continue on iPhone every 15 mins after first alert.

    When I sent an alert on my iPhone for an appointment, once it rings for the appointment once, it won't quit sending the alert until I delete the appointment. I have never had this before, but it's shown up just the last couple days. These appointment

  • How Best to Manage the Media Cache?

    Hi. I use a Mac Pro and have a 24TB RAID which holds most of my media. My problem is how best to manage the Media Cache which gets very big, certainly to hold on my OS drive (as recommended) . I could store it in a separate "cache" folder on my RAID

  • Weblogic.xml - reference-descriptor

    Hello All,           When ever I put "reference-descriptor" element directly under root element "weblogic-web-app" in weblogic.xml, I get this message during server startup..           "weblogic.xml" is malformed. Check against the DTD: org.xml      

  • No coupon/alerts for joining GCU?

    Hi, I joined GCU last week, but never received any confirmation, the 2-for-1 coupon, or anything else via e-mail (I check the spam folder, too). I can see the 20% discount working on the site, but what should I do about the rest?