Cannot use ORDER BY in cursors - why not?

When defining af cursor in a stored procedure, Oracle 8.1.7 wont let me add an ORDER BY clause. I have tried on two installations with the same result. I then asked a peer why, but he demonstrated that it was perfectly alright on his installation of 8.1.7.
So what may be wrong in my (two) configurations?
Best regards
Poul-Jorgen

Just in case you are not convinced, here is a test that duplicates the error with the cursor that has parentheses and no error with the cursor that does not have parentheses. It also demonstrates the type of cut and paste of complete code that is most helpful, that includes the SQL*Plus version, the Oracle version, the code tested, and the error message. In the example below, I saved everything to a file called test.sql, set echo on, then started the file. I added the minimum requirements, such as create or replace and null in order to complete the codes.
SQL*Plus: Release 8.1.7.0.0 - Production on Thu Oct 24 16:49:38 2002
(c) Copyright 2000 Oracle Corporation.  All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
SQL> SET ECHO ON
SQL> @ TEST
SQL> -- table for testing
SQL> CREATE TABLE anytable
  2    (anycolumn NUMBER)
  3  /
Table created.
SQL>
SQL>
SQL> -- test of what you posted with parentheses:
SQL> CREATE OR REPLACE
  2  PROCEDURE myProcedure IS
  3  CURSOR myCursor IS (SELECT * FROM anyTable ORDER BY anyColumn);
  4  BEGIN
  5  --further procedure logic
  6    NULL;
  7  END myProcedure;
  8  /
Warning: Procedure created with compilation errors.
SQL> SHOW ERRORS
Errors for PROCEDURE MYPROCEDURE:
LINE/COL ERROR
2/44     PLS-00103: Encountered the symbol "ORDER" when expecting one of
         the following:
         . ) , @ <an identifier>
         <a double-quoted delimited-identifier> group having intersect
         minus partition start subpartition union where connect
         SAMPLE_
         The symbol "group was inserted before "ORDER" to continue.
SQL>
SQL>
SQL> -- test of what I posted without parentheses:
SQL> CREATE OR REPLACE PROCEDURE myProcedure IS
  2    CURSOR myCursor IS SELECT * FROM anyTable ORDER BY anyColumn;
  3  BEGIN
  4    --further procedure logic
  5    NULL;
  6  END myProcedure;
  7  /
Procedure created.
SQL> SHOW ERRORS
No errors.

Similar Messages

  • The front camera on my iPod touch 4th generation is frozen. I cannot use it. Updating software does not help. This started right after I bought it, new from BestBuy. What can I do?

    The front camera on my iPod touch 4th generation is frozen. I cannot use it. Updating software does not help. This started right after I bought it, new from BestBuy. What can I do? When i go to the camera, it is stuck on a black screen. the only way to use my camera is through other camera apps, but if I try to switch it to the front camera, it freezes again.

    If you still have the problem after retoring the iPOd to factory defaults/new iPod then The iPod is likely defective and replacement is required.  You can make an appoinment at the Genius Bar of an APple store or take it back to BestBuy if within warranty

  • When i connect my Ipad with My pc Itune is giving msg that " This IPad Cannot  use because Apple Mobile Devise is not started"

    when i connect my Ipad with My pc Itune is giving msg that " This IPad Cannot  use because Apple Mobile Devise is not started"

    You might want to take a look at this kb
    http://support.apple.com/kb/TS1538

  • I have a new computer and cannot access  my stuff on itunes  why not

    I had to get a new computer because of a crash  everything was backed up however--itunes updated and i cannot see my music or books or apps on the itunes account   why not and how do i access my account

    Try starting iTunes while holding down the shift key. Then try to load the iTunes library which contains the information about your old media files.

  • The touch feature is not responding.  cannot use screen, the touch feature is not responding.  cannot use screen

    My ipod is frozen.  I cannot use the touch screen at all and can't get off of the locked screen or turn it off.

    What happens when you try a hard reset?  To do this press and hold both the Sleep/Wake and Home buttons together long enough for the Apple logo to appear.
    B-rock

  • Recnetly got a windo0ws update and now cannot use firefox..IE9 works but not firefox -- it hangs ..nonresponding

    Just did a securiyt update from microsoft and now firefox uses huge memory and hangs all the time.. I cannot use it anymore
    I am running sindows 7 and it has always worked jsut stopped with recent windows updates.

    -> Start Firefox in Safe Mode by holding down SHIFT key while starting Firefox
    * As an alternative method, press '''Win''' + '''R''' key combination and enter one of the following in the Windows Run box:
    ** firefox -safe-mode
    ** "C:\Program Files\Mozilla Firefox\firefox.exe" -safe-mode
    ** "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -safe-mode
    * Firefox Safe Mode window will appear -> select all options and click '''Make Changes & Restart'''
    -> click '''Firefox''' button -> go to '''History''' and click '''Clear Recent History''' -> ''Time range to Clear: '''''select Everything''' -> click '''Details''' button -> select all options and click '''Clear Now'''
    Check and tell if its working.

  • Cannot view Apple TV in iTunes, why not?

    Hi, All, just updated to a new Apple TV , looks great, however, I cannot view the box as I could with the previous box in iTunes.  I have Wireless hookup.  Any suggestions would be much appreciated.

    The current Apple TV does not show up in iTunes as there is no sync capabilities. You send content from your Mac using home sharing (computer must be on and running iTunes)
    You can also stream directly from an IOS device using airplay.

  • 3 questions: 1) I am unable on my Mac Book Pro to enable iCloud Photo sharing in iPhoto preferences, why not? I cannot see my iCloud drive contents.Why not?

    Having a Macbook Pro i have taken and loaded in 569 photos from my cameras and want to share using iCloud. But I simply cannot get iPhoto to enable iCloud photo sharing. What could be the cause? what should I try other than the instructions which I followed three times already as outlined in the FAQ section of the help function?

    OT
    Thanks for the suggestion . As soon as they hand me my laptop at the store  in 45 minutes time I shall try the disable and then re boot as you suggest.
    so far they sent me this; Disk  has no problem.They may have more to say to me re the flash drive and results of storage diagnostics and ASDs ( what is this? ) when I see them .
    The case repair is redundant to the problem I am having  but if they give me a new one worth $399 i will not complain,eh.
    Problem Description/Diagnosis
    Issue: MacBook Pro is running extremely slow. Specifically IPhoto
    Steps to Reproduce: Attempted to repair disk, no issues found.
    Cosmetic Condition: Scratches to enclosure and clamshell.
    Proposed Resolution: Tighten MagSafe board. Run storage diagnostics and ASDs if no trouble found with flash drive.
    Estimated Turn Around Time: We'll call you in 3 - 5 days
    Mac OS Version: 10.10.x
    Hard Drive Size: 251 GB
    Memory Size: 8 GB
    iLife Version: Unknown
    Employee 1178255246
    Repair Estimate
    Item Number
    Description
    Price
    Amount Due
    Customer KBB
    661-8154
    Housing, Top Case with Battery
    $ 399.00
    $ 0.00
    S1490LL/A
    Hardware Repair Labor
    $ 39.00
    $ 0.00
    Tax
    $ 0.00
    Total
    $ 438.00
    $ 0.00

  • I cannot open Google in Firefox. Why not??? This is since I "refreshed" Firefox.

    Ever since I refreshed Firefox, I cannot open Google which means I cannot access my Gmail account. This is very aggravating. Kindly help me to fix this problem I have tried the usual restart solution and it didn't solve anything.

    As you may have noticed, the Refresh/Reset feature copies your settings (profile) folder to the desktop into a folder named "Old Firefox Data".
    If Firefox was running reasonably problem-free before the Refresh, and you haven't deleted the Old Firefox Data folder from your desktop, there is a way to use the contents of that folder to revert the refresh. You might want to brew a fresh cup...
    Check inside "Old Firefox Data" folder for a folder with a semi-randomized name. If there's only one, that probably has your old settings and add-ons. If there's more than one, you'll want to work with the one that was updated most recently.
    Once you have identified the profile folder you want to restore, here is my suggested "old profile resurrection procedure":
    '''Overview'''
    These are the steps:
    # Create a new Firefox profile
    # Remove everything from that new profile folder
    # Copy in everything from the old profile folder
    '''Create a new Firefox profile (Windows)'''
    Exit Firefox and start up in the Profile Manager by pasting the following into the Start menu search box, or the Start > Run dialog, and pressing Enter:
    firefox.exe -P
    ''Note: Any time you want to switch profiles, exit Firefox and return to this dialog.''
    Click the Create Profile button, assign a name like OldSettings, and skip the option to change the folder location. Then select that new profile in the dialog and start Firefox.
    '''Open the New Profile folder in Windows Explorer'''
    Firefox in the new profile should look like a factory fresh installation. Open the Troubleshooting Information page using either:
    * "3-bar" menu button > "?" button > Troubleshooting Information
    * Help menu > Troubleshooting Information
    * type or paste about:support in the address bar and press Enter
    In the first table, click the "Show Folder" button. Firefox will launch your brand new profile folder in Windows Explorer.
    Leaving that folder open, switch back to Firefox, and Exit. When Firefox closes, the profile folder should be front and center, or you can activate it using the Task bar.
    '''Copy Old Data in Place of New'''
    In that new profile folder, select all the contents and delete.
    Leaving that window open, open or switch over to your Old Firefox Data folder. Drill down into your old profile folder. At this level you should see a folder named bookmarkbackups among other things.
    Select everything (Ctrl+a) and Copy (either right-click > Copy or Ctrl+c).
    Switch to the empty new profile folder in other window and Paste (either right-click > Paste or Ctrl+v). This may take a minute since some of the files are large.
    '''Start Firefox'''
    Firefox should start up in that new profile with the resurrected old profile data. Success?

  • Cannot use home; message says url does not exist, and firefox homepage is gone.

    When I open Firefox, I do not go to the Firefox homepage. The page that comes up has Mozilla Firefox on the top blue bar, and the navigation bar file - help. Underneath it reads "new tab" and the location bar reads "go to a website" followed by the Google search box which does drop down to reveal the other search engines. This is followed by the "home" box. When I click on home, I get an Alert box that states "The URL is not valid and cannot be loaded." I do not get the Firefox home page when I open Firefox (but it does connect me to the internet), and clicking on home does not take me to the Firefox home page either. How do I fix this problem?

    Typing in "about:home" still gets the URL not valid message. There seems to be no home to which to default, so that doesn't work. I tried to take the system back to an earlier date; it doesn't work. When I go to an earlier date and open Firefox, it crashes and needs to be reinstalled. When reinstalled, it does not give me the Firefox homepage from which to work. I generally use Google as a search engine, but do not use a google tool bar. I am at a loss as to what to do.

  • "Adobe Send cannot currently send this file."  Why not?

    I would like to send a group of 4 interrelated PDF files to an email address. I subscribed to Adobe Send. When I tried to send my files I got the message, "Adobe Send cannot currently send this file." Will I be able to use this service or should I simply cancel my subscription?

    My first attempt had been from the Send box on the Adobe Reader screen. That had failed. Once I got properly registered into Adobe Send I was able to send the same group of files with no problem although I noticed that the embedded hyperlinks used to connect the files didn't work for the Send recipient. Hyperlinks are not a deal breaker as long as I can send the files as a group.

  • I have lost my Silverfast scanning software since downloading Lion. Lion is proving a nightmare - particularly as I was originally told it would work with Silverfast. I also cannot use my Epson 2100 printer. Not a very pro ufgrade Apple. Anyone help?

    Can not use Silverfast scanning technology or my Epson 2100 Colour Stylus printer since upgrading to Mac OS X Lion. I had been assured that Silverfast would work and had no idea the printer would become redundent! Not Good information from Apple!! Anyone out there help?

    Hi, Peter;
    The culprit is Silverfast. 
    The company went as far as telling owners and new customers back in March that their software would work with Lion ("buy Silverfast version 6.6 now, and get a free upgrade to Version 8 when it we release it in late August!").  Days after Lion came out, the German software maker issued a statement that their current version is NOT compatible with Lion (knocking all of their Mac customers out of the scanning business until the newer, functional Silverfast version is ready.)
    On the company's owners-only discussion groups, Mac customers have expressed outrage that manufacturer Lasersoft was not clearer on this meltdown in the making.  Users have either had to re-install Snow Leopard, stop scanning for the next several weeks, or buy, install and learn different scanning software.
    Lasersoft has even "re-written history"; pulling earlier press coverage (which claimed their software would work with Lion) and "clarifying" that the Version 8 software (which they say will work with Lion) will be available for purchase sometime next month.  The moderator has actually censored or deleted entries offering the name of rival VueSoft (which is Lion compatible), and has removed posts from dissatisfied customers.
    Lasersoft discussion groups are amusingly Orwellian right now, with counter accusations hurled at customers who are just trying to get their software to work. Company spokesmen are issuing clumsily-worded taunts instead of apologies or simple damage control language.  UPDATE: the company has now removed some of their own more uncaring responses to users, but there is still some funny reading there.
    The whole episode begs the question of what Lasersoft was doing between spring and fall of this year when they should have been preparing a more seamless transition to Lion.  New customers who purchased the pricey Silverfast software in March are doubly out of luck-- the “free upgrade”  to Lion-compatible version 8 only applies to purchases made after June first.

  • Windows xp old desktop, downloaded firefox, able to search web with google in top righthand corner, but can't search using the firefox search box, why not?

    Computer novice, with old windows xp desktop, changed to firefox, have firefox as homepage, but can't use the central firefox search box, I type a word, click on search .......and....wait.......nothing happens. Have been able to use the top right hand corner search box (set on google). Not great with computers, so feel like I'm really missing something basic! Help! Thanks!

    hello, please see if installing the search reset addon can resolve the issue: https://addons.mozilla.org/firefox/addon/searchreset/ (a restart of the browser is necessary afterwards).

  • Cannot use Live email in Firefox; will not send and the Attachment icon dissapears

    When I open Live Sign In in Firefox on this computer, it will not let me send email and the Attachment, Photo, etc icons disappear. You cannot attach anything or send email. The Live email works fine in Chrome on this computer. Any suggestions?

    See [/forum/1/725968]
    This issue can be caused by malware.

  • Cannot load Yahoo any longer. Why not?

    I can no longer load Yahoo with the latest Firefox version. It hangs forever on the l.yimg.com prompt and when it does load the formatting is missing. I am running system 10.4.11 on a 1.83 GHz Intel Core Duo.
    I have cleared all of the history, cache, etc but to no avail. It also happens in Safari as well.

    Hello, Creswell Vandal. 
    Thank you for visiting Apple Support Communities. 
    I would need clarification on what you mean by can't sync any longer.  However, if your device is not recognized in iTunes see the section labeled Verify that the Apple Mobile Device USB Driver is installed > For Windows Vista, Windows 7, and Windows 8 > Update the Apple Mobile Device Driver.
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    Cheers,
    Jason H.

Maybe you are looking for

  • Role  in Business Partner

    Hi,      I am able to see role types like plant,,Purchasing unit in T.Code BUSD,these roles are assigned to particulare category,For example role plant we can see in Organization only but not in person,Where we do these setting. And please give me me

  • Problem with Creating changing ImageIcons

    ive created two cubes that on clicking button they change randomly them own image and i want to do that will change couple of time and after couple of loops it will stop like in the games.. i tried use Threa.sleep with no success... how to do this?

  • UWF recommended settings

    Hi, what are the recommended settings for a x86 system with 2/4GB RAM, an industrial SSD with 2 partitions D: (Protected by UWF) , D: unprotected for data ? The SSD has hardware protection against power loss. Now I have UWF on RAM (512 MB @2GB, 1024

  • Default profit center not picking

    Hi I am using document splitting and i assigned some Balance sheet accounts to the profit centers in FAGL3KEH. But that GLs are not picking the Default profit centers. I also tried in 3keh but there also not able to do. Can anybody tell that where i

  • Subquery multiple columns with Different operand

    Hi , i have 2 tables as below , table 1 , date            number    value 20-10-13      1234       500 21-10-13      1235       800 19-10-13     1234       600 19-10-13     1234       700 20-10-13      1235       500 10-10-11      1235       600 20-1