Can this usage of CASE stmt be fine tuned?

Hi,
Need inputs in improving the performance of the below query. (Other forms of rewriting the query)
insert into c(col1, col2, col3)
select b.col1, b.col2,
(case
  when b.col3 is not null and b.col2 = 'x'
  then
  (select col3 from a where a <<join_conditions_1>> b)
  when b.col3 is not null and b.col2 <> 'x'
  then
  (select col3 from a where a  <<join_conditions_2>> b)
  else
  b.col3
  end
from b;
a,b,c are tables
Thanks

Perhaps something like this...
insert into c(col1, col2, col3)
  select b.col1
        ,b.col2
        ,nvl(a.col1,a.col3,b.col3)
  from b
       left outer join a on (   (b.col3 is not null and b.col2 = 'x' and <<join_condition_1>>)
                             or (b.col3 is not null and b.col2 != 'x' and <<join_condition_2>>)
It attempts to (left outer) join to table A using the relevant join conditions, and then if it managed to join, which is tested using the NVL statement, it uses the a.col3 result, otherwise it uses the b.col3 value.

Similar Messages

  • SCOM fine tuning

    Hi, 
    i've basic question in system center world.
    i've deployed scom new installation with big workload all Microsoft products. once i imported Management pack, i received tons of error and notifications, servers status goes critical in about 18 server.
    how i can quick check and fix that, should i do that one by one or i can apply setting generally to do basic fine tuning and how i do that ?
    i red some and used most common report but i don't know i can disable all this events for time been.
    thanks, 

    Hi,
    Usually, you don´t want to import a lot of management packs at a time since they require different amounts of configuration and tuning once imported. If you haven´t done so, read the Mangaement Pack documentation that comes with every MP (or download the
    documentation if you´ve downloaded imported the MP´s from inside the SCOM console). Some MP´s requires almost no configuration while others requires a lot of configuration to function properly.
    There is no quick fix as you will have to tune the thresholds to better suit the needs of your organization. To find out what is wrong with each server, navigate to Monitoring -> Windows Computers -> Pick on of the crititical servers -> Righ click,
    choose Open and then Health Explorer.
    Inside the Health Explorer you will see what you have to do to that server but you really need to look through the Management Packs documentation, other wise you won´t get a proper monitoring.
    Regards,
    Daniel
    IT Consultant at Viridis IT

  • Noise reduction - RAW fine tuning and the Noise Reduction tool

    Hi,
    1- If I get it right, Aperture's RAW fine tuning "Automatic noise compensation" (translated from French) option uses the camera's information to adjust the noise. Is that correct?
    2- The Noise Reduction tool is there to provide additional noise reduction, but this makes you lose some details. Is that correct?
    3- How do you use them? I often find the Noise Reduction tool a bit overkill, but that's me.
    4- This one is just out of curiosity. How does A3 compare to LR3 beta for you in that regard? In my testing, LR3 did a slightly better job (but A3 totally beats the crap out of LR2 for noise). BUT I have an old D50, and newer cameras handle noise better (especially Nikon), so does it really make a difference for a 2008 or newer camera?
    Thanks!
    Manu

    Manusnake wrote:
    pilotguy74 wrote:
    I don't even have this option/checkbox in my Raw Fine Tuning brick.
    I wonder if it's due to the type of files (Canon 7D). Do you still have those 7D files I sent you? Does the checkbox appear in Raw Fine Tuning for you with them?
    I noticed this option in the manual the other day, but forgot about it until now.
    True, it doesn't have the checkbox with the 7D files. However, it as a slider "noise suppression" (again translated) in the RAW fine tuning options (and still has the Noise suppression brick).
    If you don't have this one too, have you reprocessed your images with Aperture 3? Since it has a new raw engine, it may be the cause of it.
    I find it strange that Apple didn't tout the new RAW engine on Aperture 3 new feature, it clearly is an improvement over Digital Camera RAW 2, especially in noise suppression.
    I agree the built-in noise suppression is much better than A2, but IMHO it pales in comparison with the Noise Ninja plugin from Picturecode. The key is that you calibrate a profile for Noise Ninja by shooting a color chart full screen on your computer at varying iso settings with each of your cameras. You then feed the images back in to Aperture, and tell Noise Ninja to create a noise profile for each setting. The results are amazingly good.
    Now with a lot of new cameras, noise processing is getting less important because the high iso performance is so good....but this is what makes Noise Ninja special...even when the noise adjustment is subtle, because it is working from a profile created with your camera, at the iso the shot was made at, its effects are seamless. They just announced a 64 bit plugin for Aperture 3, so no bouncing into 32 like other plugins at the moment...
    Sincerely,
    K.J. Doyle

  • My messages usage says I have 2.9GB of (saved) Messages. Thing is I have not 1 saved message, I delete them all. How can I clear this usage?

    My messages usage says I have 2.9GB of (saved) Messages. Thing is I have not 1 saved message, I delete them all. How can I clear this usage?

    AnAfromHi wrote:
    My messages usage says I have 2.9GB of (saved) Messages. Thing is I have not 1 saved message, I delete them all. How can I clear this usage?
    Firstly you DO NOT have to do a factory reset / wipe device, it is simply not required to get the space back!!
    Mine had 3GB and I just got rid of it all, here is how:
    METHOD ONE:
    Make a backup in iTunes
    open iBackupBot (Google it)
    Go to the relevant backup
    Click on Multimedia File Manager and click on the other Multimedia files tab
    Sort by filename by clicking the Filename tab
    Find MediaDomain/Library/SMS/Attachments and highlight all of them, then press delete.  You can also click to export to a folder of your choice, if you want to save them that is. 
    Then go to System Files>MediaDomain>Library>SMS>Attachments
    They will be all listed here, highlight them all and press delete
    Then just restore that backup using iTunes! 
      Tadaa! Space recovered, your messages are still there but without the attachments!  METHOD TWO:
    Backup your device in iTunes and then to iCloud
    Go to Settings>iCloud and toggle Documents & Data to OFF
    Then do a 2nd backup to iTunes and iCloud
    Then restore the device from iCloud and the message attachments should be gone, turn Documents & Data back on again in the settings
    PLEASE NOTE: Method two is a much longer process but some users may feel more comfortable with this method.
    P.S You may want to make two backups in case you get any of the above steps wrong, but it is simple to follow the above and not do anything wrong!
    P.P.S You could also just go through every single conversation and delete the attachments one by one, but if you have hundreds or thousands of attachments, this will take a VERY LONG TIME!!!

  • I have  my photoshop cc installed on my Mac and my windows laptop is it true that I can only use one or the other now? and if this is the case if my mac were turned off should my laptop now work? I am on the photoshop photography program

    i have  my photoshop cc installed on my Mac and my windows laptop is it true that I can only use one or the other now? and if this is the case if my mac were turned off should my laptop now work? I am on the photoshop photography program its just that i have never noticed tho before i have my mac turned on and the laptop PS works fine on the Mac but not on the Laptop

    Hello,
    see >>> http://helpx.adobe.com/creative-cloud/help/install-apps.html  here >>> How many computers can I install on
    I quote: You may install software on up to two computers. These two computers can be Windows, Mac OS, or one each.
    If you install on a third computer, it will request you to de-activate on the other two computers. You can then reactivate one of the previous two computers, and use Creative Cloud apps on it.
    Good luck!
    Hans-Günter

  • YouTube will not work on safari for me on the ipad. Is there anyway to fix this? I can go anywhere else on the internet fine and it works on google chrome, but on safari it shows a blank screen with the bar on top after it loads.

    YouTube will not work on safari for me on the ipad. Is there anyway to fix this? I can go anywhere else on the internet fine and it works on google chrome, but on safari it shows a blank screen with the bar on top after it loads, if it's even loading at all.
    I do not know if it's relevant or not, but I got a message on my ipad while on safari saying that my iPhone has a virus. I looked it up and it seems it might have just been an ad from the website I was on, but it happened around the same time YouTube stopped working.

    You will find that using the YouTube app will provide a better viewing experience for YouTube videos.

  • I rented a movie on my iPad. It downloaded fine but would only play 36 minutes, 5 seconds worth of the movie; although the time kept running for the length of the movie. Can this be fixed or do I need to get a refund?

    I rented a movie on my iPad. It downloaded fine but would only play 36 minutes, 5 seconds worth of the movie; although the time kept running for the length of the movie. Can this be fixed or do I need to get a refund?

    You can try a rest:
    Reset iPad:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - If that does work, contact iTunes and request a redownload.  You can ask for a refund though.

  • I HAVE TO INSTAL A PRODUCT C LLED "KUDANI AIR " . FAILURE TO DO SO IS BASED ON  ADOBE AIR , SO I AM TOLD . HOW CAN I MAKE SURE THAT IS THE CASE ?? HOW CAN I SOLVE THE PROBLEM IF THIS IS THE CASE ??

    I HAVE TO INSTALL A PRODUCT CALLED "KUDANI AIR " . FAILURE TO DO SO IS BASED ON  ADOBE AIR , SO I AM TOLD . HOW CAN I MAKE SURE THAT IS THE CASE ?? HOW CAN I SOLVE THE PROBLEM IF THIS IS THE CASE ??

    if you try to install an app that depends on adobe air, you should be prompted to download and install adobe air (unless it's already installed).
    you can download and install directly so you're not prompted by that app, Adobe - Adobe AIR

  • I have an Apple Cin HD Display 23" monitor, purchased in 2006.  I use it with a old PC (2007) running Win XP.  Works fine.  Can this monitor be used with a new PC with Intel 4th gen i5 processor, running Win 8.1?

    I have an Apple Cin HD Display 23" monitor (part no. M9178LL/A), purchased in 2006.  I use it with an old PC (2007) running Windows XP.  Works fine.  Can this monitor be used with a new PC with Intel 4th gen i5 or i7 processor, running Win 8.1?

    I have an Apple Cin HD Display 23" monitor (part no. M9178LL/A), purchased in 2006.  I use it with an old PC (2007) running Windows XP.  Works fine.  Can this monitor be used with a new PC with Intel 4th gen i5 or i7 processor, running Win 8.1?

  • I installed the latest version of flash player and it said installed successfully and i can use it just fine, but when I checked system requirements it didnt seem to match. it needed 2.33 ghz and I have 2.13ghz. can this cause problems to my computer? i h

    I installed the latest version of flash player and it said installed successfully and i can use it just fine, but when I checked system requirements it didnt seem to match. it needed 2.33 ghz and I have 2.13ghz. can this cause problems to my computer? i have an intel i3 proccessor, windows 7, internet explorer.

    Since all Intel i3 processors have at least 2 cores, your specs are well above the requirements; see http://ark.intel.com/products/family/75025#@All
    I have some computers with far slower processors, and Flash Player 14 works perfectly well on them too.

  • I have Elements 10. It doesn't handle RAW. It also doesn't allow more than one Fine JPG to be downloaded at a time. Can this be fixed with a download, or am I stuck to upgrade to Elements 13?

    I have Elements 10. It doesn't handle RAW. It also doesn't allow more than one Fine JPG to be downloaded at a time. Can this be fixed with a download, or am I stuck to upgrade to Elements 13?

    philips69374220 a écrit:
    I have Elements 10. It doesn't handle RAW.
    Yes, it does.
    FAQ: Will Photoshop Elements work with my camera, or Why won't my raw files open?
    It can handle the raw files covered by the ACR 6.7 version.
    For newer cameras, you can use the free Adobe DNGconverter to batch convert a folder into the DNG raw format that PSE10 can read and edit.
    (see the link in the upper document)
    Fine JPG to be downloaded at a time.
    All versions of Elements can open many jpegs at the same time, and the organizer lets you import as many as you want?

  • I can't sync the Not Afraid music video that I purchased this morning to my iPod Classic. It's frustrating because I have no issues syncing other videos and the rest of the album that this video came with synced just fine. Please help!

    I can't sync the Not Afraid music video that I purchased this morning to my iPod Classic. It's frustrating because I have no issues syncing other videos and the rest of the album that this video came with synced just fine. Below is an image of what my screen looks like when I try to drag the video across to my iPod:
    Please help!

    You can only sync with one iTunes library. If you sync with another one the iPod will be erased and its contents replaced with what is in the library of the second computer.
    However, you can manage music among multiple computers. See:
    Using iPhone, iPad, or iPod with multiple computers
    BTW you posted in the iPod touch forum

  • HT1689 I updated my phone to the iOS7 and now when i try to use the keyboard, i can't see myself typing and it goes very slowly. I am confused to why this happened. It worked perfectly fine with iOS6. Any suggestions?

    I updated my phone to the iOS7 and now when i try to use the keyboard, i can't see myself typing and it goes very slowly. I am confused to why this happened. It worked perfectly fine with iOS6. Any suggestions?

    Hi imobl,
    Thanks for your response, I forgot to add that the five 3uk sims we have in use, I have tried all of them none of them are recongnised non of them have pin codes, I even purchased four more sims Tmobile (original carrier) Vodaphone, 3 and giffgaff.

  • I am updating the software on my daughters IPOD touch 4th generation and it is going on 4 hours now.  I know this is not normal.  What can I do?  It synced just fine, but has been stuck on" updating ipod software for 3 hours now!

    I am updating the software on my daughters IPOD touch 4th generation and it is going on 4 hours now.  I know this is not normal.  What can I do?  It synced just fine, but has been stuck on "updating ipod software" for 3 hours now!
    She has had it for about 6 months and this is the first time we have plugged it into the computer since then.  I can not exit out of itunes either.

    If you still have the problem after retoring the iPOd to factory defaults/new iPod then The iPod is likely defective and replacement is required.  You can make an appoinment at the Genius Bar of an APple store or take it back to BestBuy if within warranty

  • Capitalization doesn't work as described. One can start with lower case and change to upper, but changing from upper case to any of the other options doesn't work. Is there a way around this or is this just a glitch that needs fixing?

    In Pages capitalization doesn't work as described. One can start with lower case and change to upper, but changing from upper case to any of the other options doesn't work. Is there a way around this or is this just a glitch that needs fixing?

    I think it does work as described, but the description is not very complete. Capitalization does not change any of the characters that you type; what it does is allow some of the lower case characters to display as capitals. If you copy the result and paste it as plain text, you'll see that the lower case characters are still there. It doesn't actually say anywhere that it can make capitals display as lower case, and it can't.
    The obvious way around this is to actually type what you want.
    The more powerful way is to install WordService from Devon Technologies which adds the functionality of Pages' capitalization menu as well a lot of other ones. WordService actually changes the character to the one displayed, and it works in most of the applications on your Mac.

Maybe you are looking for