Can anyone tell me what is wrong with the simple sql?

Hi,
I have a simple SQL (see attached). It returns records when it does not include the Order By sorting clause. However, if it includes the Order By clause, Oracle says no data found. Anyone can give me some ideas what could cause the problem?
Thanks in advance.
SELECT ih.item_key, e.episode_key, e.episode_date, wp.work_package_key, p.patient_name, c.codes_key
FROM work_package wp, episodes e, item_header ih, patients p, codes c, station_element se, station_data sd
WHERE wp.work_item_key = e.episode_key
and e.episode_key = ih.item_key
and ih.logical_parent_key = p.patient_key
and e.episode_type = c.code_value
and wp.asgn_station_key = se.item_key
and se.station_name like 'DICT FIX%'
and sd.station_key = wp.asgn_station_key
and (sd.facility = '0' or sd.facility = 1)
and wp.on_hold <> 'Y' and c.code_type = 'CEPT'
and c.setup_group = 1
ORDER BY e.episode_date, e.medrec_no;

Hmmm...can you post a SQL Plus session that demonstrates this?

Similar Messages

  • Can anyone tell me what's wrong with my queue or producer consumer loop?

    A Labview engineer helped me with the overall structure of my program, necessitated by the fast data sample rate and post processing requirements. He recommended the producer/consumer loop and using one of the example files (Cont Acq graph voltage - int clk) to do the actual data acquistion. So I put together the loop and go my two channels of data acq going in the producer loop. However, nothing's getting picked up in the consumer loop and none of my data gets displayed over there.
    Anyone care to take a look at it and let me know what I'm doing wrong?
    Solved!
    Go to Solution.
    Attachments:
    P-C Yanmar Program.vi ‏296 KB

    Your Enque Element should be inside the while loop where you aquire the data.  As it is now, the data has to stop being aquired before you send the last set of aquired data.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Can Anyone Tell me whats going on with the emulator??

    Hello I am getting an error with the emulation. I feel it its pretty pointless having it if i can not use it live. Any one out there come acroos this issue and if so how do I fix it?
    Cheers..... The emulation of samsungtest has completed successfully. Your app binary is located at c:/etc etc etcyet the emulator is not running on my desktop? Strange. I do get a pre load error and it tells me go to the bulldog. My desktop emulator on the taskbar is a blank file icon and before it loads i get a pre load error?
    Would appreciate some feed back on this if possible.
    Thanks in advance.

    it would not be install of Adobe that would cause this, however a changed printer driver may. Has the printer driver changed? Do you see any difference on the rpeort if you set the option "No Printer? (File menu, select Page setup).
    When you say the report is now 21 pages, do you mean it has more data? Or has the format changed such that it is 21 pages long. The latter would again point to printer driver...

  • I have i pad 2 ios 4.3.1 i want to update it to 4.3.3 but i get error msg 3194 can you tell me what's wrong with apple some people talking about apple don't veryfiy 4.3.3 anymore thanks alot

    i have i pad 2 ios 4.3.1 i want to update it to 4.3.3 but i get error msg 3194 can you tell me what's wrong with apple some people talking about apple don't veryfiy 4.3.3 anymore thanks alot

    4.3.5 is the current version, so that is the version that iTunes will download, not 4.3.3
    In terms of error 3194, have you got the latest version of iTunes on your computer ? - http://support.apple.com/kb/TS3694#error3194

  • Can someone please tell me what's wrong with the Inside of my iPad Charger? *Picture Included

    It won't charge my iPad. So I wanted to take a good look inside and see what's wrong with it. But I don't know anything about these wires. Here's the Pic of it.
    http://oi39.tinypic.com/2ed5yl2.jpg
    http://oi42.tinypic.com/5btptt.jpg
    http://oi39.tinypic.com/ih8rq1.jpg
    PLEASE HELP. It would be a Big Help

    That's unfortunate, because it would appear that the cable is pretty much toast. If it wasn't before, it pretty much is now that you've cracked it open.
    Either borrow one, or bite the bullet and buy one locally. You're not getting anywhere with that one.

  • When I am trying to sync my ipod touch, it gives me the message that an internal error is keeping the sync from happening.  Can anyone tell me what's wrong?

    When I am trying to sync my ipod touch, it gives me the message that an internal error is keeping it from happening.  Can anyone help?

    What is the exact wording of the error message? If an error number or additional information is not in the message
    try restoring the iPod via iTunes

  • Can someone tell me what's wrong with this LOV query please?

    This query works fine..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = 'ADAM'
    But this one..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = apex_application.g_user
    Gives the following error.
    1 error has occurred
    * LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    Thanks very much,
    -Adam vonNieda

    Ya know, I still don't know what's wrong with this.
    declare
    l_val varchar2(100) := nvl(apex_application.g_user,'ADAM');
    begin
    return 'select filter_name display_value, filter_id return_value
    from otmgui_filter where username = '''|| l_val || '''';
    end;
    Gets the same error as above. All I'm trying to do is create a dropdown LOV which selects based on the apex_application.g_user.
    What am I missing here?
    Thanks,
    -Adam

  • Having an issue with errors on a livecycle project, can anyone tell me what's wrong?

    Hello! I've uploaded screenshots of the errors here : http://imgur.com/a/0mKtU
    When you click the add button to add another column, the column appears (exactly how it should) but then this error comes up. I don't know much about any of this, but I think it's because there's something extra that shouldn't be in the code? Can anyone confirm for me or give me an answer on this? I feel like it's simple but I have little to no experience with livecycle.
    Thank you for your time and help!
    This is the code for the Oplus1Table:
    form1.#pageSet[0].Page1.WitnessTable.AddWitness::click - (JavaScript, client)
    WitnessTable.Witness1.instanceManager.addInstance(1);
    And the Errors:
    Script failed (language is formcalc; context is xfa[0].form[0].form1[0].#pageSet[0].Page2[0].Oplus1Table[0].Oplus1Table[0].Oplus1[2])
    script=...
    Error: accessor 'true' is unknown
    and this is the code for the WitnessTable:
    form1.#subform[0].WitnessTable.AddWitness::click - (JavaScript, client)
    WitnessTable.Witness1.instanceManager.addInstance(1);
    And the Error
    Script failed (language is formcalc; context is xfa[0].form[0].form1[0].#pageSet[0].Page1[0].WitnessTable[0].WitnessTable[0].Witness1[3])
    script=...
    Error: accessor 'true' is unknown
    Like I said, I don't know much, but it looks to be the same error just in different context based off of the Oplus1Table for the first error and WitnessTable for the next.
    Thanks again for any help.

    Hi Steven,
    }catch (ClassNotFoundException ex)
    catch(InstantiationException ix)
    catch(IllegalAccessException lx)
    try{
                   //can use URL + dbName here
    con =
    DriverManager.getConnection("jdbc:mysql://localhost:33
    06/dbName",user, password);
    }catch(SQLException sqx)
    {}For each of the catch block above, you should log the caught exception. This is also why you don't see any exception logged when errors occur.
    There could potentially be a long duration between servlet.init() and servlet.doPost(). So, the connection that you establish during init() may be disconnected by timeout or other means by the time the code in doPost() uses "con" . Your code does not have any mechanism for recovering a failed connection.
    Suggestions:
    1) log exceptions
    2) use a container managed JDBC connection pool
    3) post in the correct forum (Application Server)

  • I cannot get a new tab to open in FF 18. It doesn't work whether I click on + or do Fil; New Tab. Can anyone tell me what's wrong?

    The new tab opens when I click a link in the existing window, but, not when I click the + or File; New Tab. It always worked in previous versions. I tried re-installing, but, that didn't fix it either.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • Can someone tell me what's wrong with my router?

    i was just using my router half-hour ago and it was working fine......i come back on a little bit and it is not working anymore........my wlan and dmz light in front of my WRT54G router won't light up and it keeps telling me that my connection is limited...i already reset both router and cable modems like 100 times already..is there any way i could fix this?

    okay...  if you are using cable internet connection, try restting the router back to factory default settings by pressing reset butoon on the back panel of router, power cycle the n/w by unplugging power cable of router and modem, wait for couple of minutes and power up the modem first once modem is rebooted power up the router, check internet works or not, if still doesn't work let me know which internet service are you using also tell me version no of WRT54G router so that i can tell you step by step configuration of router...

  • My iPod touch (3rd gen) isn't putting out sound other than static and high pitched noises through the tv hookup, the built in speakers, and headphones. Can anyone tell me what's wrong and how to fix it?

    Everything on my iPod touch (3rd gen) works just fine except the audio out put.

    Try #2 and #3 in link below. If neither work, you most likely have a hardware issue. Contact Apple or a third-party service center.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • Can someone tell me what's wrong with this method

    public boolean drop(int col, int piece) {
              if (isLegalMove(col)) {
                   for (int r = 0; r < getNumRows(); r++) {
                        if (mySpaces[r][col] == EMPTY) {
                             mySpaces[r][col] = piece;
                             return true;
              } else
                   return false;
         }it always asks that I need to return something, what should I do??

    public boolean drop(int col, int piece) {
        if (isLegalMove(col)) {
            for (int r = 0; r < getNumRows(); r++) {
              if (mySpaces[r][col] == EMPTY) {
                mySpaces[r][col] = piece;
                return true;
        } //else <--- remove the else
        return false;
    }

  • Can someone tell me what's wrong with this code....

    I apologize in advance for anyone who isn't a Steelers fan...
    import java.awt.*;
    import javax.swing.*;
    public class myJPanel extends JPanel
         public myJPanel()
              setBackground(Color.white);
         JLabel label1 = new JLabel();
         label1.setText("Ben Roethlisberger #7 Age 23");
         add(label1);
         JButton jb1;
         ImageIcon imageBen = new ImageIcon("Ben.JPG");
         jb1 = new JButton(imageBen);
         add(jb1);
         JLabel label3 = new JLabel();
         label3.setText(whatIsUp());
         add(label3);
         for(i=0;i<20;i++)
         String whatIsUp()
              int n = 0;
              double nn = 0;
              String b = "......";
              nn = (Math.random() * 6);
              n = (int)nn;
              if (n == 0)
                   b = "Ben Roethlisberger throws a touchdown pass to Hines Ward.";
                   JButton jb2;
              ImageIcon imageHines = new ImageIcon("Hines.jpg");
              jb2 = new JButton(imageHines);
              add(jb2);
              if (n == 1) b = "Ben Roethlisberger throws a touchdown pass to Antwaan Randle El.";
              if (n == 2) b = "Ben Roethlisberger throws a touchdown pass to Heath Miller.";
              if (n == 3) b = "Ben Roethlisberger throws a touchdown pass to Cedrick Wilson.";
              if (n == 4) b = "Ben Roethlisberger throws a touchdown pass to Jerame Tuman.";
              if (n == 5) b = "Ben Roethlisberger hands off to Jerome Bettis for a touchdown.";
              return b;
    Everything is ok if i take the for loop out, but for some reason everything just gets screwed up if I have that for loop in there. And these are the error messages I'm getting.
    'illegal start of type (line 21)' and '<identifier> expected (line 48)'
    Thanks in advance for your help...

    Hey I'm sorry but this is only my second week doing
    Java. Do you think you could explain that more or
    give me an example??
    Bad Version (like yours but simplified)
    public class Sample{
      public static void main(String args[]){
        for(int i=0;i<20;i++){
          String whatIsUp(){
             return "Doc";
          System.out.println(?);// I am not even sure how to write this voodoo part
    }Good Version
    public class Sample{
      public static void main(String args[]){
        for(int i=0;i<20;i++){
          String aString = whatIsUp();
          System.out.println(aString);
      String whatIsUp(){
        return "Doc";
    }

  • Can someone tell me what's wrong with my threading code

    I got some code from a Java book on how to create a simple threading application. This is the exact code from the book but for some reason it gives me an error that non-static variables can not be referenced from static content. How can I reword this to work?
    <CODE>
    package multithread;
    import java.io.*;
    import java.util.*;
    public class MultiThread {
    class CountDownEven extends Thread {
    public void run() {
    for (int i = 6; i > 0; i -= 2) {
    System.out.println(this.getName() + " Count" + i);
    Thread.yield();
    class CountDownOdd extends Thread {
    public void run() {
    for (int i = 5; i > 0; i -= 2) {
    Thread.yield();
    public static void main(String[] args) {
    try {
    CountDownEven count1 = new CountDownEven();
    CountDownOdd count2 = new CountDownOdd();
    count1.start();
    count2.start();
    catch (Exception e)
    </CODE>

    One possible solution:public static void main(String[] args) {
         try {
              MultiThread m = new MultiThread();
              CountDownEven count1 = m.new CountDownEven();
              CountDownOdd count2 = m.new CountDownOdd();
              count1.start();
              count2.start();
         } catch (Exception e) {
    }

  • Can anyone tell me theyre experience​s with the 1126s desktop PC?

      My 1126s computer has had to be returned 2x for repairs,First time for Bios problems and now seems to be the motherboard according to tech support,Ill know in a day or so. Has anyone else heard of this kind of problem happening to them or someone they know of????Its a quad core series Pavillion

    Had to purchase the Brother..

Maybe you are looking for

  • How to get data of a particular column in action page

    Hi all, i have 2 page,a.jsp and b.jsp.in a.jsp i paste (Ctrl-V) table from a .xls file,which have say 5 row and 5 column.in which 1st row is a header and rest are data. now when i press submit then it's action go to b.jsp.here i m getting all row and

  • Attachments "removed" before email is received Treo 700wx Verizon/Yahoo! mail

    I have a Treo 700wx and use Verizon with Yahoo premium mail service. I can send and receive emails but any attachments on incoming mail is "removed" before I receive it. I actually have a message at the bottom of my email that tells me attachments ha

  • Delta upgrade of ST-SER_700 2008_1

    Dear all, I am trying to import component ST-SER_700 2008_1 in our Solution Manager. I had an error "OCS package SAPKITLOIB does not match the current software vendor". This was because I had already imported ST-PI 2008_1_700 in solution manager. I a

  • Finding columns using all_tab_columns

    I am using oracle 11g and i am having trouble finding a column name using all_tab_coulmns .Basically i dont know the exact name of the column and i used wild card in the where clause but i seems line wild card doesnt work.Could this be because of the

  • PC issue.--Problem with index step.

    Hi Today our two chains are failed at loading .. source is R/3  & update mode is delta. Iam corrected the error and loaded the delta again useing repeat option,in cube request showing repeat of last delta.In monitor screen overall status is green but