Decode Function I asked this in the wrong section so I hope Im right now!

select
a11.SEQ_MEMB_ID,
a11.Auth_Number,
a11.Admit_Primary_Date,
a11.Reviewer,
Decode (a11.Reviewer,
CLC, '2',
HBR, '3',
RAB, '4')
a11.admit_primary_date
from windsoradm.auth_master a11;
I am trying to get if the Reviewer is CLC then they are code 2 HBR Code 3 etc and it does not work. I take out the decode function and the query works. I am getting ORA-00923 FROM KEYWORD NOT FOUND WHERE EXPECTED.

Hi,
Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
Simplify the problem as much as possible. Remove all tables and columns that play no role in this problem.
Always say which version of Oracle you're using.
This is the right forum for this question. Mark your question in the other forum {message:id=10266930} as "Answered", so people won't waste their time.
925518 wrote:
select
a11.SEQ_MEMB_ID,
a11.Auth_Number,
a11.Admit_Primary_Date,
a11.Reviewer,
Decode (a11.Reviewer,
CLC, '2',
HBR, '3',
RAB, '4')
a11.admit_primary_date
from windsoradm.auth_master a11;
I am trying to get if the Reviewer is CLC then they are code 2 HBR Code 3 etc and it does not work. I take out the decode function and the query works. I am getting ORA-00923 FROM KEYWORD NOT FOUND WHERE EXPECTED.That's the correct DECODE syntax, where CLC, HBR and RAB are columns, and you want to return a string (not a number) such as '2'.
If 'CLC', 'HBR' and 'RAB' are literal values, then enclose them in single-quotes. If you want to return a number, don't put it in quotes. (Anyhting inside single-quotes is a string literal.)
Perhaps you meant something like:
,     DECODE ( a11.Reviewer
            , 'CLC'          , 1
            , 'HBR'          , 2
            , 'RAB'          , 3
            )      AS reviewer_codeThere's an error right after the DECODE. You can't use a11.admit_primary_date as a column alias. (This is probably what's causing the ORA-00923 error.) Either a11_admit_primary_date (with an underscore instead of a dot) or admit_primary_date would be okay. If a11.admit_priomary_date is the next column in the SELECT clause, put a comma befor it.
You need a FROM clause.

Similar Messages

  • Gnome-java Widget question (sorry if this is the wrong section)

    I have created three files, yes i know naming conventions and spelling is an issue, but bare with me. I plan to clean all this up as soon as I get this issue figured out. right now I am flinging mud like a howler monkey.
    File One is a test file that calls everything together:
    package test_window_creation;
    import org.gnome.gtk.*;
    import window_creation.*;
    * @author adam
    public class Create_Window_test1
          * @param args
         public static void main(String[] args)
              Gtk.init(args);
              new Create_Window();
              Gtk.main();
    }File Two is the Create_Window Class
    package window_creation;
    import org.gnome.gtk.*;
    * Very simple class to create the window construct.
    * @author adam
    * @since version 1.0.0
    public class Create_Window
         public Create_Window()
              final Window window;
              Navagation n = new Navagation();
              window = new Window();
              window.add(n.Navagation_Bar());
              //add window components here
              window.setDefaultSize(800, 600);
              window.showAll();
    }and finally File three is the Navagation (menu) class that has a private method that contains all the core componets of a menu bar, while the public method Navagation_Bar() is used to tie all those into one.
    package window_creation;
    import org.gnome.gtk.Gtk;
    import org.gnome.gtk.Label;
    import org.gnome.gtk.Menu;
    import org.gnome.gtk.MenuBar;
    import org.gnome.gtk.MenuItem;
    import org.gnome.gtk.SeparatorMenuItem;
    import org.gnome.gtk.Widget;
    * This Class is used with {@link Create_Window} to add a menu to the window.
    * This Class also hold basic information about each method involved.
    * This class contains File, View and Edit menus.
    * @author adam
    * @since version 1.0.0
    public class Navagation
          * Create the navigation (also known as Menu) for the window.
          * This Navigation method can be reused in all sorts of classes
          * that require a navigation method to be used.
          * This method is private to protect the core
          * components of the navigation bar.
         private final static Widget Navagation()
              final Menu fileMenu, editMenu, viewMenu;
              final MenuItem file, edit, view;
              final MenuItem save, copy, paste, close, help;
              final Label label;
              label = new Label ("hello World");
              fileMenu = new Menu();
              editMenu = new Menu();
              viewMenu = new Menu();
              save = new MenuItem("save");
              copy = new MenuItem("copy");
              paste = new MenuItem("paste");
              help = new MenuItem("help");
              close = new MenuItem("close");
              fileMenu.append(save);
              fileMenu.append(new SeparatorMenuItem());
              fileMenu.append(close);
              editMenu.append(copy);
              editMenu.append(paste);
              viewMenu.append(help);
              //close will close the window.
              close.connect(new MenuItem.Activate()
                   @Override
                   public void onActivate(MenuItem source)
                        Gtk.mainQuit();     
              //Help Should display a label right now until I can show a window
              help.connect(new MenuItem.Activate()
                   @Override
                   public void onActivate(MenuItem arg0)
                        label.setLabel("This is the sample help. replace this with a window.");     
              return label;
         public Widget Navagation_Bar()
              final MenuBar bar;
              bar = new MenuBar();
              bar.append(Navagation());
              return bar;
    }Now from what I understand everything has to be a widget in order to be used or added or append to other methods, classes and so on. but for those familar with gnome-java for gtk+ could some one help me out? I am getting this error on run:
    Exception in thread "main" org.gnome.glib.FatalError: Gtk-CRITICAL
    gtk_menu_shell_insert: assertion `GTK_IS_MENU_ITEM (child)' failed
         at org.gnome.gtk.GtkMenuShell.gtk_menu_shell_append(Native Method)
         at org.gnome.gtk.GtkMenuShell.append(GtkMenuShell.java:63)
         at org.gnome.gtk.MenuShell.append(MenuShell.java:79)
         at window_creation.Navagation.Navagation_Bar(Navagation.java:93)
         at window_creation.Create_Window.<init>(Create_Window.java:23)
         at test_window_creation.Create_Window_test1.main(Create_Window_test1.java:24)
    Which I know deals with the navigation bar to be precise. but what am I doing wrong to get this error thrown?

    Disclaimer: I've done no GTK programming at all.
    A naive reading of both the code and the exception stack trace suggests that Navagation.Navagation() is returning the wrong thing.
    The exception says that an assertoin that chile is a menu item failed.
    Is a Label a MenuItem?
    Unless I missed it,you are not doing anything with the menu items you create in Navagation.Navagation().

  • Alright I tried asking this in the "recording" fo

    I tried asking this in the recording section, but my cries went unanswered. I hope someone in this section has a clue. I recently purchased a X-Fi platinum (which I am planning to return soon if I can't get this resolved). I have been trying to record with the card first with the digital SPDIF in, then the Analog (aux 2), then the Analog in on the card itself, then on the SPDIF in the card. No matter what I try I cannot get the recording to go above -2db peak using any kind of source. Is this where the max record is supposed to hit's? It seems to be a bit weak. Every other sound card I have owned can easily get to 0db with minimal effort, especially with analog ins. Am I missing something, or is this card supposed to only go to -2db for recording? I made a recording and opened it in soundforge, and there was barely a wave form. Is my card defecti've maybe, or is it a design limitation??BTW, I did RTFMI did try maxing just about every windows mixer config I can think of. I did look through every tool (software) and config I could find that installed with this card, and I am just confounded.

    SB Audigy Advanced MB with Sigmatel STA9220 audio chipset
    Input Monitor is half way between and is greyed out, trying to connect a Line In device an audio mixer and trying to record audio but the audio recording is at constant level and am unable to reduce the volume level using the Input mixer?
    How do I enable the Input mixer.

  • Is there a cd making software like Jam 6.0.3 that will let you crossfade songs in a playlist that works on 10.7 or later OS? Sorry if this is the wrong place to post this.

    Is there a software app out there like Jam 6.0.3 that allows you to arrange and crossfade songs in a playlist that works on 10.7 or later OS? I have Jam on 10.6.8 now and it works great but it will not work on 10.7 and I need to upgrade the OS to run a new Drobo setup.
    Sorry if this is the wrong place to post this question please direct me to the right place.

    Hi, I'm not sure it does what you want, but only thing I can think of is Audacity...
    http://audacity.sourceforge.net/download/mac

  • I know this is the wrong forum, but- (Mac question)

    I know this is the wrong forum, but…
    Can anyone enlighten me?
    How did a folder named just "Adobe", containing only something called "Acrobat.com.app"), end up in my root Applications folder?
    Double clicking on "Acrobat.com.app" launches an installer that wants to install something called "AIR".  What is that and what is it needed for?
    What forum should I be posting this in?
    A global search and searches in the Acrobat Macintosh forum were not helpful.
    Can I just delete that Adobe folder or ignore it?  It has identical Creation and Modified dates of January 15, 2010 17:56, which raises more questions than it answers.
    Any input will be appreciated.
    Wo Tai Lao Le
    我太老了

    pwillener wrote:
    …Adobe Reader 9.0 came with two installers: one bundled with Acrobat.com and Adobe AIR (AdbeRdr90_en_US.exe, 34302 KB), the other one without any bundled software (AdbeRdr90_en_US_Std.exe, 25772 KB).
    …<snip>…
    P.S. what I wrote above is about the Windows version; I assume that the Mac versions are the same.
    Maybe… kinda, sorta…  There are no ".exe" files in the Mac world. 
    I've never downloaded or installed either Acrobat.com or Adobe AIR.  It has to have been the Acrobat Reader 9.3 update for the Mac that installed that sucker on my Mac. I had certainly never seen it before.
    That, on top of the inexcusable, abominably surreptitious "Growl" installed by Adobe behind my back, strengthens my resolve not to acquire any more Adobe products, free or otherwise. 
    What in blazes are the Adobe corporate folks thinking? 
    Wo Tai Lao Le
    我太老了

  • Am I asking this question in wrong place?

    Am I asking this question in wrong place?

    http://developer.apple.com/library/ios/#featuredarticles/ExternalAccessoryPT/Int roduction/Introduction.html#//apple_ref/doc/uid/TP40009502
    You could have easily found this same link by using Google.
    Please try it next time before posting a question.

  • What does the PopUp "Prevent this page from creating additional dialogs" really mean and if I check the Box, how do I undo this if this was the Wrong Thing To Do?

    What does the PopUp "Prevent this page from creating additional dialogs" really mean and if I check the Box, how do I undo this if this was the Wrong Thing To Do?
    Details
    Constantly, while using Firefox (Beta v 11.0), and/or ESPECIALLY, when I have my eMail @ Mail.com open, I get this PopUp stating: "For security reasons, restarting mail.com Mail is possible only via the mail.com Mail Service. Please close this window and restart mail.com Mail" BUT Then there is a CHECKBOX: "Prevent this page from creating additional dialogs."
    I have no idea if Checking this Box is a Good Idea or if it will Screw-Up my mail.com Mail Service...
    Anyone have an answer or explanation of the Use of this Little Check-Box?
    BJ Orden [email protected]

    You do not get any pop-up windows on that website if you tick that box.
    That setting is stored in the cache and you should see pop-ups again if you reload the page and bypass the cache.
    Reload web page(s) and bypass the cache.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Cmd + Shift + R" (MAC)

  • Deleted I posted in the wrong section ^^

    Whoops posted in the wrong section
    Message was edited by:
    Dream-Scourge

    ALSO, cleaning....
    http://www.maximumpc.com/files/u69/MSI_GX740.jpg
    the area on the bottom surrounding the mouse sensor, anyone find a good way of cleaning that? everything i've tried leaves marks or is ineffective....
    this was the result of my attempt to clean it looked worse
    even bought a "micro-fiber" lens cleaning sheet...bought a few actually--different brands. didn't really help.

  • I have a new Macbook Air and for the last few days the fan had run continuously, this is the first time it has ever run, and now it won't stop, the fan starts up as soon as I turn it on. The computer is not hot.Any ideas on how I can fix this please ?

    I have a new Macbook Air, 6 months old, and for the last few days the fan had run continuously, this is the first time it has ever run, and now it won't stop, the fan starts up as soon as I turn it on and the computer seems to running more slowy.The computer is not hot but I am worried it may burn out,.Any ideas on how I can fix this please ?

    Hello dwb,
    Here is the screen shot, just the top half, there are another 10 pages, but I guess this should enough for you to have an idea of waht is going on, bit small I am afraid. No, I don't have any apps setup to run when I open my computer, the kernel, varies between 290 and 305 per cent ish.
    Would that PRAM thing help ? I think it may be the computer itself, well something inside, as this the first time that the fan has ever started running since I have this computer, even when I have 3 or 4 apps running.
    Thank you again for your advice,
    Regard,
    Beauty of Bath

  • HT1386 I have an old IMac with 10.4.11 & the most uptodate Itunes it allows me to download (this isnt the most uptodate as u'd imagine) I now have new Iphone 5 i want to add my itunes songs etc to but when i plug it in it doesnt register the device. Any a

    I have an old IMac with 10.4.11 & the most uptodate Itunes it allows me to download (this isnt the most uptodate as u'd imagine) I now have new Iphone 5 i want to add my itunes songs etc to but when i plug it in it doesnt register the device. Any advice?

    Printed on the side of the box your phone came in:
    Requirements to sync with a Mac:
    OSX 10.6.8 or higher & iTunes 10.7 or higher.
    You need to update your computer, if you can or purchase a new computer, if you want to use your phone with your computer.

  • How do i get my photos to stream to my iPad in the events that were oringally created.  Right now they are streaming as photos and are not grouped at all.  I would like to get them back into the events that were originally created

    how do i get my photos to stream to my iPad in the events that were oringally created.  Right now they are streaming as photos and are not grouped at all.  I would like to get them back into the events that were originally created

    Hi..
    Thanks for the reply..
    My original I Phone 5 was running IOS 6.12
    My I phone 5S currently runs IOS 8..When I upgraded it, it had IOS 7 on it which made the I Photo app compatible with everything below IOS 8...( which the photo app is not compatible with ) so I just connected the I Phone 5S to my computer and thinking the new phone had IOS 7 on it that these was nothing to worry about..I thought all 900 + pictures in the photo stream would transfer but somewhere in the process, I Tunes decides to just go and install IOS 8 which requires that you run a " Photo Migration App" to transfer photos from IOS 7 & below. The problem was is that I didn't want IOS 8 on my new 5S so I thought I wouldn't have to do that part..
    Anyway the phone emerged with IOS 8 on it and the only photos that remained were the ones that were actually on the phone..The 900 + I had in the stream didn't transfer because the Photos that works on IOS 7 and below isn't compatible with IOS 8..I guess you have to use the photo migration app that comes with IOS 8 & I phone 6..But I didn't ask to upgrade to IOS 8...It just did it on it's own!
    I still have the I Phone 5 Back up that I did just before giving it back to Verizon but if I try to restore the I Phone 5S running IOS 8 those photos in the stream will not go back on the phone because IOS 8 isn't compatible with the I Photos" that ran on IOS 7 and below..
    So I have an I Pad mini that runs IOS 7..should I try and erase it...and put that I Phone 5 backup on it and pray the photos that were in the stream come back on it so I can transfer them back to my computer...then erase the I pad mini again and restore it using it's original backup that I have on the computer and the in the cloud?
    I know this sounds confusing but I'm at a loss as to what to do..This is what I found ...http://support.apple.com/en-us/HT201386
    but it doesn't help me..
    Steve

  • Hi , i bought this phone from Dallas , TX  on 22 jun 2012 , right now I am in india . My phone Accidentally fall in water tub. And now is not working . For iphone replacement ,I went to local apple store in Pune (India). but these guys are not helping me

    hi , i bought this phone from Dallas , TX  on 22 jun 2012 , right now I am in india .
    My phone Accidentally fall in water tub. And now is not working .
    For iphone replacement ,I went to local apple store in Pune (India). but these guys are not helping me . And they  are not ready to replace my phone .
    I also tried contacting local apple employee  named " RATI KALE " , but didn’t got any positive response.
    I provided them apple invoice, passport, visa details, my air ticket details. but still  they are not ready to help me . My phone details are as below :
    Serial No:C8*******T9Y , IMEI : 01*************995
      Please help me in replacing my phone.
    <Personal Information Edited by Host>

    Your warranty is only good in the US where you bought the phone. You will need to contact Apple Support in the US to arrange to return your phone to the US for repair. You should also inquire as to whether they will be able to return the phone to you in India.
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Apple - Support - Contact Apple Support.

  • Number of connection to this computer limited and all connections are in use right now

    I have Lenovo ThinkPad T520 (i7, NVIDIA 4200TM) with dock station and two monitors. Sometimes when I close notebook and undock it from dock station. Then I cannot login to my notebook because of error "Number of connection to this computer limited and
    all connections are in use right now". This is screenshot of my laptop  http://i.imgur.com/6MXnQKf.jpg
    Laptop is not in domain and does not have remote desktop connections. It was just turned in sleep mode and late turned on. 
    This happen pretty often one from 10..20 times of undock.  It did not happen with Windows 7 before. 

    The network does not work properly after you resume the computer. This kind of issues are cuased by the network device driver. Download the latess Windows 8 driver from Lenovo website and install it.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

  • TS4079 Both my wife and I have iPhone 5 and we use Siri a lot. Ever since we upgraded to IOS 7 we found that frequently we get a reply from Siri something like "This is embarrassing but I cannot handle a request right now". Prior to IOS 7 this did not hap

    Both my wife and I have iPhone 5 and we use Siri a lot. Ever since we upgraded to IOS 7 we found that frequently we get a reply from Siri something like "This is embarrassing but I cannot handle a request right now". Prior to IOS 7 this did not happen.

    tonefox is probably right.  Server overload.  I also notice that when siri does respond correctly, it is slower.  My wife has a 4s and same story, and she has not upgraded to IOS 7.
    So it's not just you (if that makes you feel any better).

  • Hello! I have a MacBookPro5,1. I recently had to erase the disk and start over. So right now I have OS X. what is the best(cheapest/fastest) way to get current on my OS to be able to use current websites and programs? thanks!

    Hello! I have a MacBookPro5,1. I recently had to erase the disk and start over. So right now I have OS X 10.5.5. what is the best(cheapest/fastest) way to get current on my OS to be able to use current websites and programs? thanks!
    Right now there is pretty much nothing on it, and I cant download basic things.

    Upgrading to Snow Leopard
    You can purchase Snow Leopard through the Apple Store: Mac OS X 10.6 Snow Leopard - Apple Store (U.S.). The price is $19.99 plus tax. You will be sent physical media by mail after placing your order.
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store. Access to the App Store enables you to download Mavericks if your computer meets the requirements.
         Snow Leopard General Requirements
           1. Mac computer with an Intel processor
           2. 1GB of memory
           3. 5GB of available disk space
           4. DVD drive for installation
           5. Some features require a compatible Internet service provider;
               fees may apply.
           6. Some features require Apple’s iCloud services; fees and
               terms apply.
    Upgrading to Mavericks
    You can upgrade to Mavericks from Lion or directly from Snow Leopard. Mavericks can be downloaded from the Mac App Store for FREE.
    Upgrading to Mavericks
    To upgrade to Mavericks you must have Snow Leopard 10.6.8 or Lion installed. Download Mavericks from the App Store. Sign in using your Apple ID. Mavericks is free. The file is quite large, over 5 GBs, so allow some time to download. It would be preferable to use Ethernet because it is nearly four times faster than wireless.
        OS X Mavericks- System Requirements
          Macs that can be upgraded to OS X Mavericks
             1. iMac (Mid 2007 or newer) - Model Identifier 7,1 or later
             2. MacBook (Late 2008 Aluminum, or Early 2009 or newer) - Model Identifier 5,1 or later
             3. MacBook Pro (Mid/Late 2007 or newer) - Model Identifier 3,1 or later
             4. MacBook Air (Late 2008 or newer) - Model Identifier 2,1 or later
             5. Mac mini (Early 2009 or newer) - Model Identifier 3,1 or later
             6. Mac Pro (Early 2008 or newer) - Model Identifier 3,1 or later
             7. Xserve (Early 2009) - Model Identifier 3,1 or later
    To find the model identifier open System Profiler in the Utilities folder. It's displayed in the panel on the right.
         Are my applications compatible?
             See App Compatibility Table - RoaringApps.

Maybe you are looking for

  • "Table VSEOPARENT is not in the database" after system copy to x64

    Hi SDNners, We've just completed a system copy of our SolMan 3.1 system onto a new (Xeon x64 based) server. This system copy is part of the process of moving SolMan 3.1 from an old server onto 64bit hardware and then upgrading it to SolMan v4 and Ora

  • Urgent question pls :( [Related in Syncing and backing up all library~

    ok im planning to buy a new laptop, but I have a question. I have desktop pc which is all my music/apps/movies are stored, then how to put my whole library to another computer? *cheers mate*

  • RE: Production Environment Definition

    Brad, We use connected environments so that we do not have a single point of failure. We use multiple environments and connect them together in a star topology for reliability of service. Our servers (23 in total) sit out at branches in the back of b

  • Create both onscreen and database storage JSP application

    Hi, My JSP application is a JSP form with name, address, phone number, etc. and a submit button. The output currently shows onscreen with no database connection. Can someone please tell me how I store this in the Oracle database and would it be possi

  • I want to caluculate expiration date column

    CREATE TABLE test_table EXPIRESON TIMESTAMP (3), lastrun TIMESTAMP (3), STARTDATE varchar2(35), TITLE VARCHAR2 (60 BYTE), ENDreportAFTER NUMBER (10), NOOFRUNS NUMBER (10), RUNONSUNDAY NUMBER (1), RUNONMONDAY NUMBER (1), RUNONTUESDAY NUMBER (1), RUNON