CASE statement... problem using it... what have I done to deserve this?

I'm trying to use a CASE statement in Ora 8.1.7 (with compatible
set to 8.1.0) and am finding that I cannot compile the
procedure.
I'm using the CASE statement in a call to a procedure...
insert_addr (p_id_number => v_id_number,
p_addr_type => v_addr_type,
p_addr_status => v_addr_status,
p_addr_pref_ind => v_pref_addr_ind,
p_date_modified =>
(CASE
WHEN cmf_rec.hadoc = cnv_constants.nov17_1958
THEN cmf_rec.doe
ELSE cmf_rec.hadoc
END)
I'm getting "PLS-00103 Encountered the symbol "CASE" when
expecting one of the following..." error msg when compiling.
What have I done wrong? Syntax error? Should I change the
compatible parameter?
Thanks.

You can actually use the CASE statement in Pl/Sql, though not like in SqlPlus.
You have to use dynamic Sql.
Example
create or replace procedure test_case1 is
v_sql varchar2(4000);
begin
v_sql := 'update case_test set qual_rule = '||
         '(case '||
         ' when dob < ''01-jan-1902'' then ''100+'' '||
         ' when dob between ''01-jan-1902'' and ''31-dec-1912'' then ''90-99'' '||
         ' when dob between ''01-jan-1912'' and ''31-jan-1932'' then ''70-89'' '||
         ' when dob between ''01-jan-1932'' and ''31-jan-1952'' then ''50-69'' '||
         ' when dob between ''01-jan-1952'' and ''31-jan-1972'' then ''30-49'' '||
         ' when dob between ''01-jan-1972'' and ''31-jan-1984'' then ''< 30'' '||
         ' else ''under age'' '||
         ' end ) ';
execute immediate v_sql;
commit;
end test_case1;

Similar Messages

  • HT5661 What have you done to email this is the worst thing you have changed . If I touch to see what I have sent the message on my screen goes directly to the sent. This is not what I wanted it it do. As always some one has screwed up a good thing

    Some one thought they had a better idea. That some one should leave well  enough alone . I am talking about the new down load os7 today. They f up the mail. Don't fix what isn't broken .

    Do you see a n "Old Firefox Data" folder on the desktop in case Firefox got reset?
    Do you have more than one profile folders present if you check that?
    You can use this button to go to the current Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    Go one level up to the Mozilla\Firefox\Profiles\ folder in case a new profile got created.
    *http://kb.mozillazine.org/Recovering_a_missing_profile

  • I own Adobe Creative Suite 5 Design Premium Upgrade and I bought the upgrade to Adobe Creative Suite 6 Production Premium but it wont work with my serial number what have I done wrong

    Hi Mark,
    I own Adobe Creative Suite 5 Design Premium Upgrade and I bought the upgrade to Adobe Creative Suite 6 Production Premium but it wont work with my serial number what have I done wrong
    Mick

    Moving this discussion to the Downloading, Installing, Setting Up forum.
    Aussimick you will want to enter in the qualifying serial number from the full version of Adobe software you purchased.  You can find the serial numbers located under your account by following the steps listed in Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html.

  • I am making my first keynote presentation.  I transferred the slides from a power point.  I did not use a 'theme' from keynote.  Keynote will not let me 'name' the presentation and the 'save as' option will not come up in the menu.  What have I done wrong

    I am making my first keynote presentation.  I transferred the slides from a power point.  I did not use a 'theme' from keynote.  Keynote will not let me 'name' the presentation and the 'save as' option will not come up in the menu.  What have I done wrong

    When it comes to Keynote, I try and start with a presentation that's 1680 x 1050 preset or something in that range.  Most projectors that you'll get at a conference won't project much higher than that and if they run at a lower resolution, it's better to have the device downsize your Keynote.  Anything is better than having the projector try and upsize your presentation... you work hard to make it look good, and it's mangled by some tired Epson projector.
    As far as slides go, scan them in at 150 dpi or better, and make them at least the dimensions of your presentation.  Keynote is really only wanting 72dpi, but I do them at 150, just in case I need to print out the presentation as a handout later, and having the pix at 150 dpi gives me a little help with their quality on a printer.
    You'd probably have to drop in the 150 versions again if you output the Keynote to .pdf or Word or something, but at least you have the option.
    And Gary's right (above) go ahead and scan them as TIFFs.  Sooner or later you'll want to do something else with these slides (like make something for an iPad or the like) and having them as TIFFs keeps your presentation looking good.
    Finally, and this is a big one, get to the location for your presentation ahead of time if you can, and plug the laptop in and see what you get.  There's always connection problems. Don't let the AV bonehead tell you everything will work just fine ('... I don't have any adapters for a Mac...') .  See it for yourself... you're the one that's standing up there.  Unless it's your boss, then you better be really sure it works.

  • I am using iPhone 4 from the last one year and went dead and got it replaced by paying Rs.12500/- to Nyasa Sion Koliwada Mumbai Service Provider but now again after 38days the problem has started, what do i do? Is this is the quality & service we boost?

    I am using iPhone 4 from the last one year and went dead and got it replaced by paying Rs.12500/- to Nyasa Sion Koliwada Mumbai Service Provider but now again after 38days the problem has started, what do i do? Is this is the quality & service we boost? On visiting the store we get only one reply you may write to Apple directely. we have the similar kind of problem with iPad which is being used by my wife Mr.Neelam Vij and paid Rs.16000/- to get it replaced within a year & 6months use. so in totality we have paid Rs.28500/- + Rs. 3000/- diagnostic charges.
    1. iPhone 4 , 32 GB Black with Sr. No. 88******A4T
    2. iPad 2, 16GB White with Sr. No.DL*******KPH
    Moreover, we have no information to contact whom. even the replace set has a warranty of only three month which further confirm that Apple itself is not confident wheather product will last after replacement for more then three month. Such kind of happening do not encourage anyone to recomend this product to anyone. Would appriciate a faster response to our problem if someone from Apple is going to read this email.
    Thanks & Regards
    A K Vij
    <Personal Information Edited by Host>

    http://support.apple.com/kb/he57?viewlocale=de_de
    India
    (91) 1800 4250 744
    www.apple.com/in/support/
    hope it helps

  • HT5361 When inserting pictures in a new mail message using the " photo browser" button I can view and select photos but the " choose "  button is gone. What have I done wrong?

    When inserting pictures in a new mail message using the " photo browser" button I can view and select photos but the " choose "  button is gone. What have I done wrong?

    Hi Liz,
    Sorry to hear you are having a similar problem.  Last night I went to the tool bar at the top of iphoto, clicked on "File",  then clicked "Browse Backups" in the drop down menu.    I have an external hard drive that is set up to Time Machine.   The Browse Backups  opened the iphoto pages in the Time Machine.  I selected a date one day ahead of the day I performed the now infamous update, and it showed my iphoto library as it had existed that day.   I then clicked  "Restore Library" at the bottom right corner of the Time Machine screen.   Roughly 2 hours later my iphoto was back to normal.   When I opened iphoto there was a message saying I need to upgrade my program to be compatible with the new version of iphoto(version 9.2.1).  I clicked "Upgrade" and within seconds it had done whatever upgrading it needed to do. 
    The only glitch in the restoration was that it restored the library as it appeared last week, so I no longer had photos I had imported this past weekend.   I simply went back to the Browse Backups in the drop down menu,  when Time Machine opened I selected the page showing my pictures from this weekend and again said to Restore Library.   Roughly 45 minutes later the library was restored including the most recent photos.  
    I am now a happy camper. 
    I don't know if any of this will be of help to you because your email says you are having trouble with photos imported after the upgrade was performed.   Have you had any pop up notices when you first open iphoto,  that tell you you need an upgrade to be compatible with the new iphoto?     If so have you clicked "upgrade"? 
    Good luck Liz,  if you have Time Machine running as a back up to your library, maybe you wil be able to get help there, by following my instructions above.   Otherwise,   good luck with your investigations.   I'd be interested in hearing how you make out.
    Karen

  • I have to constantly keep restarting my computer for it to connect to the internet, what can be done to correct this problem?

    I have to constantly keep restarting my computer for it to connect to the internet, what can be done to correct this problem?

    Hi, this has worked for a few...
    Make a New Location, Using network locations in Mac OS X ...
    http://support.apple.com/kb/HT2712
    10.7…
    System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.
    10.5.x/10.6.x/10.7.x instructions...
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.
    Instead of joining your Network from the list, click the WiFi icon at the top, and click join other network. Fill in everything as needed.
    For 10.5/10.6, System Preferences>Network, unlock the lock if need be, highlight the Interface you use to connect to Internet, click on the advanced button, click on the DNS tab, click on the little plus icon, then add these numbers...
    208.67.222.222
    208.67.220.220
    Click OK.
    Also, turn off IPv6:
    System Preferences » Network » AirPort » TCP/IP tab » Configure IPv6
    Or whatever Interface you use.

  • I would like to know if anyone, after downloading Lion OS, lost their Quicken 2007?  If so, what have they done to remedy the problem?

    I would like to know if anyone, after downloading Lion OS, lost their Quicken 2007?  If so, what have they done to remedy the problem?

    From the quicken website:
    Converting your data from Quicken for Mac
    Create a copy of your current Quicken for Mac data file.
    Important: You'll want to use the copy for the conversion. Do not use your original data file.
    Launch the Quicken File Exchange Utility (it's located on your Quicken Essentials disk).
    Follow the on-screen instructions to locate the copy of your old data file and then convert your data from Quicken for Mac to Quicken Essentials.
    Open Quicken Essentials.
    If you want to import your old data into a new Quicken Essentials data file that you’ve already started using (optional), make sure that the new data file is now open in Quicken Essentials.
    Choose File > Import, and then select the file that you just created during the conversion process.
    The conversion file has a .QDFX extension. You’ll find it in the same folder as the copy of your old Quicken for Mac file.

  • I have an Iphone 4 16gb and updated the IOS 6.1.2. after the update my 3G is not working at all??. can you please suggest what can be done to rectify this problem?

    i have an Iphone 4 16gb and updated the IOS 6.1.2. after the update my 3G is not working at all??. can you please suggest what can be done to rectify this problem?

    I have the same problem.  After updating to 6.1.2 my iPad 3,2 will not find Verizon network.  It just says "Searching..." for ever.  Any thoughts?

  • HT1937 I have a locked iphone 4S (AT&T Carier). What must be done to unlock this phone to use the other carrier in my local

    I would like to unlock my iphone 4S
    I have a locked iphone 4S (AT&T Carier). What must be done to unlock this phone to use the other carrier in my local

    Only way is to contact the carrier to officially unlock the iPhone.
    https://www.att.com/deviceunlock/client/en_GB

  • Up to yesterday, I could upload photos with no problems, to Ancestry.ca.  I have Iphoto 8.1.2. What have I done?

    I have been uploading photos for months now to Ancestry.ca.  Now, it does not work.  What have I done?
    Help!

    Carol, not sure I undertand exactly but does the first one in this list help?
    There are many, many ways to access your files in iPhoto:   You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    Uploaded with plasq's Skitch!
    There's a similar option in Outlook and many, many other apps.  If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    If you want to access the files with iPhoto not running:
    For users of 10.6 and later:  You can download a free Services component from MacOSXAutomation  which will give you access to the iPhoto Library from your Services Menu.
    Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and 10.5 Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    Drag and Drop: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    File -> Export: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    Show File:  a. On iPhoto 09 and earlier:  Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.    3.b.
    b: On iPhoto 11 and later: Select one of the affected photos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder window will pop open with the file already selected.

  • Since the last actualization you have done on June 29, 2014, I cannot either access my photos or complete the actualization. What can be done to correct this problem?

    I Cannot access Adobe Revel since your last Actualization done on June 29. I cannot either access my photos or complete thte actualization. I have tried it several times since that date. What can be done to correct this problem?
    Revel

    Are you on an ios device and trying to upgrade to 2.3.2?
    Please refer to the post below for updates on the revel installation issue:
    Adobe Revel 2.3.2 installation issue

  • TS3276 Help!! I'm a fairly new MAC user. My Email has frozen on the computer. I cannot close Email to do a reboot. what have I done wrong and how do I correct the problem. My server is obviously working. thanks, Sharon

    My Email has frozen. I'm unable to close Email so I'm unable to reboot the computer. I'm a fairly new Mac user. What have I done wrong? And how do I resolve the issue? thanks, Sharon

    Force quit. cmd-option-esc key combo. Then choose Mail and force quit in the window that presents itself.

  • I have done something terrible!  nopen up, 'event'  but if I click on them a triangle with an exclamation point comes up.  What have I done, how can I get them back?

    I have done something terrible!  now some of my photos will not open up, I can see them in the 'event' but if I click on some of them I get a gray triangle with an exclamation point.  What have I done and how do I rectify it? 

    The exclamation shows when the file path/link to the original file has been broken.  Apply the two fixes below in order as needed: 
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start with Option #3, followed by #4 and then #1 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • Oh Nokia, what have you done? (UK)

    Oh Nokia! What have you done?
    Restricting the Lumia 920 to a single network in the UK is a MAJOR mistake!
    Ok, logic states you want to push the 920 via a 4G network, of which there is only one currently but that doesn't mean people will switch to that network.
    We all know 4G will come to the other networks and people will buy a phone based on that and a myriad of other factors such as network coverage, customer service, Operating System etc.
    So restricting availability to a single network which, to be frank, is not regarded as having the best service or coverage is simply ludicrous.
    Yesterday I saw a retailer in the UK offering the 920 SIM Free. Yahoo! I can jump in with an off-contract purchase to supplement my two other Windows Phone 7.5 devices - one of which is also a Lumia (800 in this case, bought on the day of release!).
    'Are you sure this is SIM Free and therefore Carrier unlocked?' I ask. 'Yes, all our SIM Free phones are unlocked.' came back the response.
    OK, here is my £459 to buy the device....
    Imagine my surprise when neither of my O2 SIMs were able to be used but my T-Mobile SIM was!
    Call the retailer to be told by the Manager that it was SIM Free and unlocked. Back to shop I go - much testing with many SIMs ensued and a call to Tech Support confirms my suspicions that it was indeed locked to the EE family (EE/T-Mobile/Orange).
    'Can I have an unlock code please?' I ask to have the response there are none available. Only option is to refund!
    So Nokia, you have lost a sale of your flagship device (and being part of a UK Smartphone community that reviews, tests and supports such devices and users) and I know there is latent demand for it out there but no-one I know wants it on that network and certainly not on the commercial terms on offer where the 4G element is restricted...
    The HTC 8X although specification wise maybe not quite close enough to the 920 to be called equivalent is close enough and has such a commercial advantage (read minimum £60 cheaper) and is available SIM Free to be the one to buy if you want a Windows Phone 8 device now.
    So much for your loyal customer base who jumped in with Nokia on the release of the Lumia 800, they cannot now go to the 920. The 820 is not flagship and in comparison to the HTC 8x is somewhat lacking ( I had them both in my hands yesterday).
    Oh, dear, Nokia, this is hardly likely to help your financial woes when you restrict sales of your flagship device in the UK.
    I am happy to engage on this with Nokia UK and even review said device but in reality all I want is to be able to buy the device for personal use.
    The Nokia Value Proposition is a strong one compared to the other Windows Phone 8 manufacturers (HTC 8S/X and Samsung Ativ) with the exclusive and attractive software elements but that's only a real value if the device can be obtained otherwise it is irrelevant.
    I look forward to Nokia's response.....

    Today I phoned t-mobile UK (South African call center???) to order an 920 as an upgrade, I made it quite clear that I wanted the 920, but the customer services advisor was absolutely determined to sell me an iPhone 5, stating the IP5 was a 'much better phone' etc. I was pretty annoyed at this behaviour as he was doing absolutely everything he could to persuade me to buy the IP5. I ended the call without ordering anything.
    I eventually managed to order a 920, this time through a UK call centre, it would seem t-mobile UK and orange UK are doing everything in their power NOT to sell the phone, it's not listed on either of their online shops, even though you CAN buy it from them. Initially I was told the 920 wasn't available on t-mobile, even though my friend had got on on t-mobile a few hours earlier, once informed of this, they remembered it was available and allowed me to order.
    To me it seems the TMUK and Orange are pushing the EE network at the expense of Nokia. Why, because people are put off by EEs ridiculously high monthly price plans, and TMUK & Orange aren't making it known that you can get it on their network at a much cheaper monthly rate.

Maybe you are looking for

  • IMac MacBook Air PowerPoint

    Requesting help from the Community to problem solve this presentation problem: I want to project a PowerPoint presentation from an iMac 7,1 to a digital projector, control the presentation by remote, and (this is the hard part) use my MacBook Air 3,2

  • POST data without navigating to page

    Hi, I need to POST some data collected in a form to an ASP page hosted by another person. How do I do this without navigating to that ASP page, so I can remain within my own website ? Thanks for the help, M

  • Both overlayed and stacked plots in same chart

    I want to display a measured variable on top of its reference value in a chart. I've got eight of these measurement/setpoint pairs, and I want to stack them in eight displays in the same chart. Is this possible?

  • Block IP Address/Site

    Have asked this on another site with negative results. But the problem is that I use Shirt-Pocket's backup program "SuperDuper!". Works fine for me. I wanted to update the program to its latest revision. SuperDuper will phone home and look for Update

  • Account blocked for phone calls

    I have a regular account and I can use it without any problems for Internet based communication. When I try to call via phone, I get a message that my account is blocked. I still have credit left on my account, so not having credit does not seem to b