Can't get my first Function to work!

Hi everyone,
I have been trying to make a function, but it won't compile without errors. I already checked the forum and other sites for an answer, but I can't seem to find one. So here's my function (I'm taking an integer value as an input and returning a char):
CREATE OR REPLACE FUNCTION fCotePourNote (laNote IN Inscription.note%TYPE)
RETURN Inscription.cote%TYPE IS
     laCote CHAR(1);
BEGIN
          IF laNote >=90 THEN
               laCote := 'A';
          ELSE IF laNote >=80 THEN
               laCote := 'B';
     ELSE IF laNote >=70 THEN
               laCote := 'C';
          ELSE IF laNote >=60 THEN
               laCote := 'D';
          ELSE
               laCote := 'E';     
          END IF;
RETURN laCote;
END fCotePourNote;
When I try to run my script, I get tihis error :
22/5 PLS-00103: Encountered the symbo "FCOTEPOURNOTE" when expecting one
of the following:
if
I really don't get why since I correctly ended my if.
Any help would be greatly appreciated :-)

/* Formatted on 12/6/2012 8:17:23 AM (QP5 v5.215.12089.38647) */
CREATE OR REPLACE FUNCTION fCotePourNote (laNote laNote IN Inscription.note%TYPE)
   RETURN  Inscription.cote%TYPE
IS
   laCote   CHAR (1);
BEGIN
   IF laNote >= 90
   THEN
      laCote := 'A';
   ELSIF laNote >= 80
   THEN
      laCote := 'B';
   ELSIF laNote >= 70
   THEN
      laCote := 'C';
   ELSIF laNote >= 60
   THEN
      laCote := 'D';
   ELSE
      laCote := 'E';
   END IF;
   RETURN laCote;
END fCotePourNote;In if statement you have used
if
else if -> Separetely,
else if
end if
end if
end if
if you want to use only one end if
if
elsif
elsif
end if
check the if syntax, your issue will be solved.
in your case these many end if's should be there
/* Formatted on 12/6/2012 8:20:08 AM (QP5 v5.215.12089.38647) */
CREATE OR REPLACE FUNCTION fCotePourNote (laNote laNote IN Inscription.note%TYPE)
   RETURN  Inscription.cote%TYPE
IS
   laCote   CHAR (1);
BEGIN
   IF laNote >= 90
   THEN
      laCote := 'A';
   ELSE
      IF laNote >= 80
      THEN
         laCote := 'B';
      ELSE
         IF laNote >= 70
         THEN
            laCote := 'C';
         ELSE
            IF laNote >= 60
            THEN
               laCote := 'D';
            ELSE
               laCote := 'E';
            END IF;
         END IF;
      END IF;
   END IF;
   RETURN laCote;
END fCotePourNote;

Similar Messages

  • I have a MacBook, made in 2010. I can't get the eject function to work. I have a DVD in now and want to eject it and put another one in. Command-E, dragging it to the trash or Find-Eject does not work. Ideas?

    I have a MacBook, made in 2010. I can't get the eject function to work. I have a DVD in now and want to eject it and put another one in. Command-E, dragging it to the trash or Find-Eject does not work. Ideas?

    Hi there. Hear are some other options . Hold down for click on the track pad while restarting and keep it down all the way thru boot. Or use right click on a mouse. If it's stuck, sometimes sticking a business card in top edge of slot while trying the eject option can work.

  • I have tried to reindex my messages but I still can not get the search function to work in email

    I have tried reindecing my messages by rebuilding the library but I still can't get my message function to work in mail.  Any proposed solutions much appreciated.

    Some of your user files (not system files) have incorrect permissions or are locked. This procedure will unlock all your user files, reset their ownership, and remove their access-control lists. If you've set special values for those attributes, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Back up all data.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Enter the following command in the Terminal window in the same way as before (triple-click, copy, and paste):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR..; sudo chown -R $UID:staff ~ $_; sudo chmod -R u+rwX ~ $_; chmod -R -N ~ $_; } 2>&-
    This time you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Can't get the view function to work properly...

    For some reason, I no longer can get the VIEW function to do what I want. Specifically, everytime I try to get ARTIST to show, it shows ALBUM BY ARTIST instead. This does NOT happen in my downloaded file, only in the entire library. Anyone else have this happen to them? Please advise.

    In the Masked Artwork folder go to a photo with the keyword "food".   Does it have a check mark at food?
    I have had situations where the photo had the keyword printed under the title, but the check mark is not present.  A search with that combination for the keyword yields "no image found".
    Go to bottom of your keywords panel and look under Other Keywords.  Is Food there and checked?  If so you can right click on this keyword and Find will work.  If you have the type of situration where keyword has no check mark in your tree, except for at Other, I found you have to delete them and then re-enter them.  It will then work.
    Let me know what you find discover.

  • I can't get the autofill function to work

    When filling out a form, the auto fill function points to my wife (who owns the icloud).
    How can I get it to point to my data?

    Select your card in Contacts. Then select
    Card ▹ Make This My Card
    from the menu bar.
    In Safari, select
    Safari ▹ Preferences ▹ AutoFill ▹ AutoFill web forms: Using info from my Contacts card.

  • HT2845 how can I get the scroll function to work on my magic mouse?

    I got my magic mouse to work perfectly with my macs but I also have a work computer which is a windows vista lenovo.  All functions work with the mouse on my pc but the scroll function when I'm in excel which is a big deal for me because I am an accountant.
    tks.

    Use the Image Capture application. It is already installed on your computer.
    See:
    Mac Basics: Using a scanner
    http://support.apple.com/kb/ht4505
    I hope you get this issue sorted out.
    Austin

  • Can't get the "find" function to work in Bridge CS4?

    Hello there,
    I need a bit of help with the Find funtion in Brdige CS4. Basically it doesn't work. I've got a folder with multiple files and keywords and the search brings up "no results" regardless what I do. What could be the problem?? I'm running Windows XP.
    thanks,
    Geordie

    In the Masked Artwork folder go to a photo with the keyword "food".   Does it have a check mark at food?
    I have had situations where the photo had the keyword printed under the title, but the check mark is not present.  A search with that combination for the keyword yields "no image found".
    Go to bottom of your keywords panel and look under Other Keywords.  Is Food there and checked?  If so you can right click on this keyword and Find will work.  If you have the type of situration where keyword has no check mark in your tree, except for at Other, I found you have to delete them and then re-enter them.  It will then work.
    Let me know what you find discover.

  • I have a macbook pro version 10.7.5 and my mailbox will not open at all and comes up with a quit message even though it is not open. how can i get into my account. it works on my iPhone an i have internet and all other functions working on my computer

    I have a macbook pro version 10.7.5 and my mailbox will not open at all and comes up with a quit message even though it is not open. how can i get into my account. it works on my iPhone and i have internet and all other functions working on my computer

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the name of the crashed application or process in the Filter text field. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, look under User Diagnostic Reports (not "Diagnostic and Usage Messages") for crash reports related to the crashed process. The report name starts with the name of the process, and ends with ".crash". Select the most recent report and post the entire contents—the text, not a screenshot. I know the report is long. Please post all of it anyway.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • How can you get the apple tv to work in a hotel where to get on the wifi you have to still go to a website first and put in your room

    How can you get the apple tv to work in a hotel where to get on the wifi you have to still go to a website first and put in your room?

    Welcome to the Apple Community.
    Unfortunately the Apple TV doesn't have a web browser so you can't do that.

  • Hello, all of a sudden without apparent reason I can't get "MAIL" to function. It starts up but I get the color wheel turning like crazy and never ends. I've tried restarting and I still can't get it to work. PLEASE HEEELP!?

    hello, all of a sudden without apparent reason I can't get "MAIL" to function. It starts up but I get the color wheel turning like crazy and never ends. I've tried restarting and I still can't get it to work. PLEASE HEEELP!?

    In the Desktop Manager > Sync > Configuration, make sure the calendar options are set to override Outlook.
    Set it also to notify you of the changes, so you will have to approve any changes.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How can I get my excel spreadsheet to work in numbers

    How can I get this budget sheet to work in numbers when it's from excel.

    I couldn't get the picture of the whole thing it wouldn't load but you see where it say like 700.00 then below that it say 175.00 well that part works telling me what I need to know but when it get to where it says the 850 it stops working? it won't sum it out or something I'm not great with excel and this was sent to me by a first and it's our budget plan and I really need to be able to use it

  • Can't get wake on lan to work on Hp n40l microserver

    Hello
    I installed arch on my HP proliant microserver and I can not get Wake on lan to work. I tested my device with ethtool and it supports and is enabled for WOL with g value set for both.
    But whenever I power it off by systemctl poweroff I can no longer see it as a connected device to my router
    Before installing arch I tried ubuntu for testing the hardware quickly and I got wake on lan working there. I can not figure out what might be the issue here. Wake on lan is enabled in the BIOS.
    Any help would be appreciated
    Cheers

    As I see in the Archwiki , the wol package would also need the IP address ( though not necessary ) along with the mac address of the server.
    I fear that the nic on the server does not obtain an ip in shutdown state, since I can't see it in my attached devices in the router settings( I could be very wrong ! )
    Tried using wol on a laptop running arch, but with no luck.
    I have seen this workaround in several places
    https://bugs.launchpad.net/ubuntu/+sour … bug/981461
    I even tried creating a similar script which would first do
    ip link set dev enp2s0 down
    systemctl poweroff
    but that did not work either.
    Cheers
    Last edited by ayushjsh (2013-04-03 07:00:28)

  • Can't get wake on demand to work in 10.6.1!

    Ever since I upgraded itunes and Snow Leopard to 10.6.1 I can't get wake on demand to work. I worked fine before with my airport express G.
    All my firewalll setting are ok and the function is turned on under power saving.
    I tried to restart, itunes, the mac, the airport and even the iphone. Weird.

    Thanks. But I have done all these things. I give up. The only thing I havn't done is reinstall the remote app. Hopefully 10.6.2 will fix it.

  • Can't get my audio clip to work in Keynote except in edit mode. I've followed Help instructions to the letter. Any suggestions?

    Can't get my audio clip to work in Keynote except in edit mode. I've followed Help instructions to the letter. Any suggestions?

    Hi Gary - thanks so much for your help. I'd already done that, but finally stumbled across the answer for my situation. I'm new to iMac and this is the first time I used Keynote, so maybe this info will help someone else along the way - I still haven't found this in any of the Keynote documentation or forums I've read.
    My slides were all set up with at least one text box in which the text was animated. The sound was the last thing I added to each slide, exactly following the info in Keynote Help re: adding audio. The audio would work when I tested it in Inspector mode, and also if I switched to soundtrack instead. But not if sound was added to each individual slide. Hmmm. After I submitted the question above, I was running through the (auto) slide show one final time to check text, animation, etc. when I noticed that on just one single slide the sound effect came through, but at the very tail end of the slide. Hmm again. Why?
    Through trial & error, the answer was in the animation section - not very intuitive re: audio. The steps to correct the issue were: 1) click on the sound icon embedded in each slide, 2) click on the animation tab in Inspector. 3) There's a drop-down menu there that allows you to reposition the audio clip to the #1 spot (if it was added after other "animation"). This allows the sound to begin before the text animation begins on each slide. Before doing this, I guess the sound was in there but the slides were transitioning before it had a chance to play.
    Since this is the first time I've used Keynote and it's the most recent version, I'm not sure if this is a new feature to allow users to choose where within a slide to play a sound effect, but I'm guessing that might be why was unable to find any info on how to solve it. Hopefully this will help others who get stumped.
    Thanks again for jumping in to help! I really appreciate it.

  • I can't get my me mail to work on iCloud keeps rejecting my user id nothing works on the pad or pod either to do with mobile me aaaaaaaaaaaargh

    I can't get my me mail to work on iCloud keeps rejecting my user id nothing works on the pad or pod either to do with mobile me aaaaaaaaaaaargh
    Apple - please please let us know what is going on

    ewaller wrote:
    fazio96,
    Could I prevail upon you to come up with a better thread title?  I resisted my first inclination to move the thread to "Dustbin"; but I will say the title does little to inspire us to help.   You may wan to read the article linked in my signature.
    Thanks.
    I'll change it now. I just realized it sounds rough, but I was mad because I couldn't get it work, it isn't anyone's fault, sorry
    EDIT: I got it to work at an usable state! By using the 8192cu driver on the AUR and the suggestions in the comments about disabling power-save, I got it to be usable. It now has up to 8% packet loss, not 30-40% like before, and the ping spikes are now 300-400 ms and less frequent, not 1000-1200ms. It's not working really well but now I can at least surf the web. Thank you all for the patience.
    EDIT 2: after testing more I realized it still disconnects every few seconds when I'm far from the AP. However, when connected, I still have very strong signal. If I use it on windows or another distro it doesn't disconnect. I tried compiling the driver from realtek by myself using the istructions in the second post but I don't know how to fix some compile errors, so I decided I'll stick with my usb dongle. Maybe someone will find a better solution.
    Last edited by fazo96 (2013-09-30 16:08:10)

Maybe you are looking for

  • How do you change the lenght of the text field in fb50?

    Hi, In the transaction FB50  , the long text field In the item line  is not showing the whole description written in the text field (word pad).when viewing the item  details it is showing ony half description.How do we increase the field size?

  • AD Trusted Reconciliation Issue in OIM 11g R2

    Hi, I am trying to reconcile the users from AD(Trusted Source) to OIM 11g R2. I gave object class as User. and User ID in search filter but by default ObjectCategory is getting added in my search filter. so my search query ends up something like.. (&

  • FCP Effects-A more detailed question

    I JUST INSTALLED "SNOW LEOPARD" OS BEFORE I HAD THIS ISSUE!! Could it make a difference? I have dragged both "color corrector" and "adjust brightness and contrast" over to clips in my timeline. I highlight the clip in my timeline. I then select the f

  • A problem while dragging to desktop

    hi everyone , I had a problem like 5 months ago with my graphic card , and they replaced the motherboard . the computer used to work fine perfectly but yesterday I downloaded lion and install it , and I found a strange problem , its when I drag anyth

  • Prepopulating PDF forms with data from XML file

    How can I get a PDF form to open pre-populated with data from an XML file automatically? I've been using Adobe LifeCycle Designer 8.0 and there doesn't seem to be a way to do it. The closest I came was to use the ImportData method, but that only lets