Need help instruction box

I am very new to writing PL/SQL statements. Here's the problem I want to get help. I use 'Oracle SQL Developer'. I would take the age of an individual and to make a column derived showing that they are in the age group. My information comes only from a table. Here is the code I wrote so far and the error message I get:

SELECT DPSID,
LAST_NAME,
FIRST NAME,
Date of birth
trunc (MONTHS_BETWEEN (SYSDATE, e.dob) / 12) AS 'the age '.

CASE
WHEN trunc (MONTHS_BETWEEN (SYSDATE, e.dob) / 12) < = 21 THEN '18-21.
WHEN trunc (MONTHS_BETWEEN (SYSDATE, e.dob) / 12) BETWEEN 22 AND 30 THEN '22-30 '.
WHEN trunc (MONTHS_BETWEEN (SYSDATE, e.dob) / 12) BETWEEN 31 AND 40, THEN "31-40".
WHEN trunc (MONTHS_BETWEEN (SYSDATE, e.dob) / 12) BETWEEN 41 AND 50, THEN "41-50.
WHEN trunc (MONTHS_BETWEEN (SYSDATE, e.dob) / 12) BETWEEN 51 AND 60, THEN "51-60.
ANOTHER "60 YEARS".
END
AS the age 'medium '.

OF ODS_OWNER. E EMPLOYEES;

ORA-00923: THE KEYWORD not found where expected
00923 00000 - "FROM keyword not found where expected"

I would like to know how to get the "Age range" column to appear when I run the query.

Thank you

959001 wrote:
ORA-00923: THE KEYWORD not found where expected
00923 00000 - "FROM keyword not found where expected"

Very often, this Message indicates that a commata missing between the column list. Because after the missing comma oracle expects logically the FROM keyword.

In your case, the missing comma is in the column 'age' and the following case statement.

Tags: Database

Similar Questions

  • Please help: instruction box - ORA-01722: invalid number error

    Hi all
    I am trying to use the Case statement to recode the status canceled in two groups
    "Reject" If the difference between the date of the first and the last date is less than 29 and
    'Accept' if the difference between the date of the first and the last date is greater than 30

    Here's my data 'test'

    STATUS FIRST_DATE LAST_DATE

    Transfer / / 10/08/2011-10/09/2011
    Mover 10/08/2011-15/09/2011
    Cancel the 16/09/2011 10/08/2011
    Cancel the 10/08/2011 5/09/2011

    Here's the syntax

    Select a.*,
    (CASE WHEN a.STATUS = 'Cancel' CAN (round(a.LAST_DATE-a.FIRST_DATE))
    0 OTHERWISE
    END CAN_DAYS),
    (BOX WHEN "CAN_DAYS" > 29 THEN "reject"
    WHEN "CAN_DAYS" < 30 THEN "accept."
    Reject_Accept END)
    try one

    The first CASE statement works very well and gives me this
    STATUS FIRST_DATE LAST_DATE CAN_DAYS

    Transfer 0 10/08/2011-10/09/2011
    Mover 0 10/08/2011-15/09/2011
    Cancel the 37 16/09/2011 10/08/2011
    Cancel the 26/10/08/2011 5/09/2011

    but the LATTER product ORA-01722: invalid number error. It's something to do with the type of data CAN_DAYS, Oracle does not see in the Numeric form I think.
    I want to see result
    STATUS FIRST_DATE LAST_DATE CAN_DAYS Reject_Accept

    Transfer 0 10/08/2011-10/09/2011
    Mover 0 10/08/2011-15/09/2011
    Accept to cancel 37 10/08/2011-16/09/2011
    Refuse to cancel the 26/10/08/2011 5/09/2011

    Could someone please help me fix the syntax?
    Thank you in advance,

    Hello

    The error is due to the fact that you are trying to compare "CAN_DAYS", which cannot be regarded as a number, a number.
    You can try this option for your results:

    select A.STATUS, A.FIRST_DATE, A.LAST_DATE,case
                                                when a.status ='Cancel' then round(a.last_date - a.first_date)
                                                else 0
                                                end as can_days,
                                                case
                                                when (a.status ='Cancel'  and round(a.last_date - a.first_date) > 29) then 'Reject'
                                                when (a.status ='Cancel'  and round(a.last_date - a.first_date)< 30) then 'Accept'
                                                else null
                                                end as Accept_Reject
    from test a 
    
  • Need help, my box outline does not display anything, I can barely see the top of the coghweel and everything is hidden, it will not develop to open countours.  How to view these as before?

    countour box.jpg

    You can see the grey box it below outline.  That's all that shows when I click on it.  I see more he outlines and barely the gear wheel.  I've tried everything.  How can I fix it?

    Try to reset your preferences: ctrl/cmd-alt/opt-shift at the start of the PS.

  • Need help with box counting Script

    He had to count the number of boxes checked. I use the script below and its does not work. What I am, I am doing wrong? It drives me crazy.

    /*

    document level function to calculate the sum of the fields named

    Function Sum (aFieldNames) {}

    var sum = 0; sum of values

    Browse fields

    for (var i = 0; i < aFieldNames.length; i ++) {}

    If (!) IsNaN (this.getField(aFieldNames[i]).value))

    sum += Number (this.getField(aFieldNames[i]).value).

    }

    to return the sum;

    } / / end of the sum function

    */

    Bay of somme of domain names

    var aCheckBox = new Array ("check Box5', 'Check Box8', 'Vérifier Box11', 'Check Box16', 'Check Box19', 'Check Box22', 'Check Box25', 'Check Box28', 'Check Box31', 'Check Box34', 'Check Box37', 'Check Box40', 'Check Box43', 'Check Box46', 'Check Box49', 'Check Box52', 'Check Box55', 'Check Box58', 'Check Box61', 'Check Box64', 'Check Box68'");

    sum, named fields

    Event.Value = Sum (aCheckBox);

    Then why you check if they are several using the isNaN function and then try to add this number to the sum variable? Looks like you just copy the code, even if it does not apply to your situation.

    Replace these two lines of code with this:

    If (this.getField(aFieldNames[i]).value! = "Off") sum ++;

  • I'm new construction sites and need help with boxes of zoom

    I'm currently building a website with a shopping cart, before getting to the basket I'd like to see an option for expansion of each element. They see the regular image and then if I could add a button they can click to view a larger image. Unfortunately I do not have the Web site on a server at this time. Any help you can give me would be appreciated. Thanks in advance.

    Try this:

    http://ALT-Web.com/demos/jQuery-disjointed-image-gallery.shtml

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • Need help/instruction to swap the DVD/CD on Satellite 5200 burner

    Hello

    who can give me advice how to take that old burner out of the laptop?
    Which screws I release?

    I already tried to free the B6 those and tried to pull not out... no chance.

    How does it work?
    I have to buy a new one in order to get this laptop that works again.

    Concerning
    Andreas

    With the B6 is not bad. Please check where the B20 screw is placed. Near this screw, you will find another one (without number). Remove it and this will allow you to unlock the select Bay.

    Move Style Bay latch in the UNLOCK position. Grasp the module Style Bay and slide on. All that s!

    Good luck!

  • Need help setting bios to boot from the cd. I did already but the laptop does not start again for cd player.

    Hello

    I forgot that my administration windows log password after the holidays.  I have loaded down a free program called Ophcrack and had set my laptop to boot from cd 1 but I just cannot get the laptop to boot from a cd.  He just continued boot from the internal hard disk.

    The cd is an image and it is bootable on my desk.

    The model of laptop: laptop HP ENVY m6

    Product number: C2N77UA #ABL

    BIOS version: F.25

    Processor type: Intel Core i7-3632QM CPU @ 2.20 GHz

    OS: Windows 8.1

    I only did a password reset disk (I'm learning the hard way now!).

    I don't want to do a "System Recovery" because I have some data on it.

    I realize there are paid there password recovery tools windows, but I would like to use this 'free' program to try to break 1.

    I just need help / instructions to set the bios for laptop can be started from a cd.  I also tried to boot from a key USB but the laptop kept begin its internal drive.

    Help, please.  Thanks a ton!

    Ted

    Hi Ted,

    You are welcome

    Boot into the bios menu and go to the very section where you have disabled the Secure Boot.

    Find an entry called materials and this value to Activate.

    Save the changes and exit the bios.

    Follow the previous procedure below:

    Insert the bootable disc of Ophcrack and laptop stop.

    Tap away at the esc you key start Notepad to open the Start Menu.  Select boot options ( f9 ), use the arrow keys to select the CD/DVD drive and press ENTER.  You can also get a prompt to "Press any key to" continuous - it if requested.

    Kind regards

    DP - K

  • When I install FSX SP2, the box of the menu showing the plan chosen and also in the game, the graphics are all messed up (black, black with lines on the screen and so on) do not know what to do? I need help.

    I have FSX Deluxe. When I installed FSX SP1, it was all fine, but when I installed FSX SP2 graphics were messed up. So I uninstalled FSX SP2 and tried again, and it was the same thing. So I uninstalled FSX all together and reinstalled fresh and put on FSX SP1, it was going well until I put FSX SP2, the same thing happened again, messed up graphics.

    So I uninstalled FSX SP2 and updated my drivers graphic and tried again and the same thing happened.

    I need help please.
    Thank you

    Hi Mmarshall_1993,

    Welcome to the Microsoft Answers site.

    We would like to get a better understanding of this issue, so we can better help not only you but other users with similar problems.

    (a) what operating system do you use?

    Method 1:

    Adjust display settings

    Many recent Microsoft games require a card video and monitor that can run a resolution of at least 800 x 600 in color (16 bit). Set the resolution of Windows display on 800 x 600 in color (16 bit), and then test the game. To do this, follow these steps:

    1. in Windows XP, click Start, point to settings and then click Control Panel.
    In Windows Vista, click on start to reduce this includes personalization thtype in the Search box and then click on personalization in the programs list.

    2. in Windows XP, double-click display.
    In Windows Vista, click display settings.

    3. click on the settings tab.

    4. move the slider of the desktop area or screen area slider to 800 x 600 pixel definition.

    5. in the Color Palette box or in the color box, click colors (16 bit).

    6. click OK and then click OK again.

    7. click Yes to accept the setting.

    Method 2:

    Adjust graphics hardware acceleration

    To adjust graphics hardware acceleration, use the method described for the operating system that you use:

    ·         Windows Vista

    1. click on start to reduce this includes this ima, type personalization in the Start Search box, and then click personalization in the list of programs .

    2. click on display settings.

    3. click on Advanced settings.

    4. click the Troubleshooting tab, and then click change settings.

    Reduce this includes this imIf that you are prompted for an administrator password or a confirmation, type the password or click on allow.

    5. move the notches on both Hardware Acceleration slider to the left of full (the parameter disable the accelerations of cursor and bitmap ).

    6. click OK and then click restart now.

    7. once the computer has restarted, test the game.

    ·         Microsoft Windows 2000 or Windows XP

    1. click on Start, point to settings and then click Control Panel.

    2. double-click on display.

    3. on the settings tab, click Advanced.

    4. click on the Troubleshooting tab.

    5. move the notches on both Hardware Acceleration slider to the left of full (the turn off all cursor and advanced drawing accelerations setting).

    6. click OK and then click OK again.

    7. test the game.

    Method 3:

    Check or turn on Direct 3D

    To check or turn on Windows XP Direct3D acceleration, follow these steps:

    1. click on Start, click run, type dxdiag , and then click OK.

    2. on the display tab, verify that all DirectX features are enabled. If all the features are disabled, click enable next to the feature.
    Note If some DirectX features are unavailable, verify that your video card meets the minimum requirements.

    For more information, follow the below mentioned articles.

    How to resolve display issues in Microsoft games

    http://support.Microsoft.com/kb/263039

    The Flight Simulator X game display flickers and are damaged on a Windows Vista-based computer that is connected to multiple monitors

    http://support.Microsoft.com/kb/933590

    Hope this information is useful.

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Need help with custom dialog box

    I created a custom help dialog box. The problem is that 5 buttons do not properly fit in my manager of horizontal field on some blackberry devices. How can I make own? I tried to use my own custom buttons that allow me to specify their width and height, but I'm unable to get the width of the dialog box, so I can't determine how wide should be buttons.

    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    
    public class HelpDialog extends Dialog
    {
        static int ButtonPressed;
        HorizontalFieldManager hfmChoices = new HorizontalFieldManager();
        ButtonField cmdFirst = new ButtonField("|<")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 0;
                close();
                return true;
            }
        };
        ButtonField cmdPrev = new ButtonField("<")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 1;
                close();
                return true;
            }
        };
        ButtonField cmdNext = new ButtonField(">")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 2;
                close();
                return true;
            }
        };
        ButtonField cmdLast = new ButtonField(">|")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 3;
                close();
                return true;
            }
        };
        ButtonField cmdClose = new ButtonField("Close")
        {
            protected boolean navigationClick(int status, int time)
            {
                close();
                return true;
            }
        };
    
        public HelpDialog(String message, int page, int maxPages)
        {
            super("Help (Page: " + page + " of " + maxPages + ")\n\n" + message + "\n", null, null, -1, null, 0);
            ButtonPressed = -1;
            if (page <= 1)
            {
                cmdFirst.setEnabled(false);
                cmdPrev.setEnabled(false);
            }
            if (page >= maxPages)
            {
                cmdNext.setEnabled(false);
                cmdLast.setEnabled(false);
            }
            hfmChoices.add(cmdFirst);
            hfmChoices.add(cmdPrev);
            hfmChoices.add(cmdNext);
            hfmChoices.add(cmdLast);
            hfmChoices.add(cmdClose);
            add(hfmChoices);
        }
    }
    

    Thank you

    Most people have no need a close button, they expect the ESC to do it for them.

    That said, I disagree with this statement:

    "I think that the only good way to use managers other than the AbsoluteFieldManager, is to use them at all."

    Designing a user experience that works well on multiple devices is difficult, and I don't think that has a size fits all approach work.  In addition, I don't have the time to create formats for specific screens for each device type, and although this will not happen now, I didn't have to rework screen designs every time that a new device came out.  I think that it is possible to create a common user interface experience given the size of the screen, and whether it is touch.  If you want to read my thoughts on this, have a look at the tutorial of the user interface you will find here:

    http://supportforums.BlackBerry.com/T5/Java-development/tutorials-for-new-developers-part-1/m-p/1621...

  • Adobe muse working on a menu lighbox and need help I can not the box of active relaxation, even if I checked trigger on top

    Adobe muse work on a menu lighbox and need help I can not the box of active relaxation, even if I checked trigger on top anyone with a suggestion?

    Thank you, it ends up being a superposition problem, thank you, but I can see where an invisible element could be a problem too. I use to select it all the trick to understand where I've been in Illustrator all time years ago I am so new Muse that I kept thinking can be as simple as I can go back to things I've done in other Adobe programs, but it is! and I'm an old school Print Designer who doesn't REALLY know the thing no coding thank once again

  • I need help on how to audio output when I go. I ticked the box at the bottom, but when I go to view my video on quicktime, it does not play audio.

    I need help on how to audio output when I go. I ticked the box at the bottom, but when I go to view my video on quicktime, it does not play audio.

    GUYS, I GOT IT. AND THE SOLUTION IS WAYYYYY WITH JUST A RENDERING. So after countless time I spent trying to make it, I found a way that me really happy that my old rendering has not worked. All you have to do is download adobe media encoder and BAM your gold. I make it in h.264 that i couldt using the old rendering and now it works fine.

  • I need assistance in the import of certain vectors, watercolor color chart and other creative market (step by step instructions).  Im a newbie to Illustrator and need help.

    I need assistance in the import of certain vectors, watercolor color chart and other creative market (step by step instructions).  Im a newbie to Illustrator and need help.

    Should be the subject of the file > open.  After the download.  The swatches will come with the file.

  • Need help to fill in a text box in a drop-down list.

    I think I have most of the code and correct settings, but I need help.

    I have a drop down list that is populated with 3 States. When a certain State is selected in the drop-down list, I need a text box to fill with tax information for each State. I list them set up variables that define the drop-down list data and the data that I want to appear in the text box. I also code basic javascript in place - but it is not perfect.

    The problems I'm having with the dynamic .pdf file include:

    1. where a State is selected in the drop-down list, the user must first click the text box so that the appropriate text appears in the box.

    2. when a State is selected in the drop-down list and the user clicks on the text box to display the text of tax info, tax info text does not change as it should if a user selects a different State in the drop-down list.

    3. the tax information in the text box will appear for 2 States (what is because the variable list that I put in place for these States has too many characters of text? Is there a way to bypass this limitation?)

    Can someone help me change the javascript code and settings that I use to make the text field to fill in correctly? It is the first project of livecycle that I tried and my first experience with javascript.

    Here's the file I'm working on:

    http://www.filedropper.com/outofstatetaxtemplate2

    Just discovered this chapter sample of Peachpit Press which talk about whatever it is you are trying to do.

    http://www.Peachpit.com/articles/article.aspx?p=1021020&seqNum=4

    They provide even a sample download in order to examine the code. Change the numeric field in a text field, and you're all set.

  • Need help with my Mail window. I can't export my message to the PST format. I keep getting the message error "an error occurred during initialization of MAPI".

    Hello

    Need help with my Mail window. I can't export my message to the PST format. I keep getting the message error "an error occurred during initialization of MAPI". Y at - it solution or another method?

    Hi ErikLee,

    Do you have MS Outlook installed on your computer?

    Windows mail import and export opportunities are limited to an Outlook .pst file or an Exchange Server mailbox. They are available only if MS Outlook is installed.
    If MS Outlook is not installed and you start an import or export action, the necessary support files are not present for Windows mail complete the operation. Then I suggest you to install Outlook temporarily and see if the problem is resolved.

    Follow the instructions below and check if the problem is resolved.

    1. reboot your computer, and then start Windows Mail.
    2. on the Tools menu, click Options.
    3. in the connection tab, click on edit to open the Internet Properties dialog box.
    4. in the tab programs, click on an application other than Windows mail e-mail in the e-mail list. Click on apply and then click OK.
    5. click OK again to close the Options dialog box.
    6. exit Windows mail and restart Windows mail.

    If this does not work, I suggest you upgrade to Windows Live Mail to import or export messages that may help you resolve the issue.

    To download Windows Live Mail, visit the following Microsoft Web site:
    http://get.live.com/wlmail/overview

    For more information about Windows Live Mail, see the Microsoft Web site at the following address:
    http://windowshelp.Microsoft.com/Windows/en-us/help/4b30d3d6-abe2-46d1-a5fd-4a1ba786a1381033.mspx

    Check whether the problem is resolved.

    Please post back and let us know if it helped to solve your problem.

    Kind regards
    KarthiK TP

  • I need help! I can't cancel my subscription - aid pages continue to take me in circles and do not provide a way for me to contact Adobe

    Please help me. I have CAREFULLY read and followed the instructions on the pages of help/contact Adobe to try to cancel my recurring subscription, but nothing helped. He keeps taking my back on the same page to say that I have to contact customer support to cancel. And when I try and contact customer support, he told me to write on the forum. Very frustrating that I can't get support, as I pay Adobe every month.

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If he continues to not try to use a different browser.

    To the link below, click on the still need help? option in the blue box below and choose the option to chat or by phone...

    https://helpx.Adobe.com/contact.html?step=CCSN_membership-account-payment_cancel-your-memb ership_stillNeedHelp

    If only all always not what you try to do is to send a private message to one of the staff people that you will find on the page overview of the next forum and see if this help you organize the necessary contact.  Adobe Creative Cloud

Maybe you are looking for