Feature Request: Line Number on Syntax Error

Hi,
When I execute a query in the query window and there is a syntax error, I don't get the line number of where the error is as I normally do in SQLPlus. Is this this something that can be added to the error message?
thanks
-Niels

Alternatively, if you feed the SQL into a procedure (or anon block) something like below, this will give you the exact character position of the failure.
I've previously used this in a java/jdbc web-based ad-hoc query solution to good effect, and so blaming java/jdbc is not really valid.......
CREATE OR REPLACE
PROCEDURE parse
(sqlstr IN VARCHAR2)
IS
cur BINARY_INTEGER := DBMS_SQL.OPEN_CURSOR;
errpos BINARY_INTEGER;
fdbk BINARY_INTEGER;
BEGIN
DBMS_SQL.PARSE (cur, sqlstr, DBMS_SQL.NATIVE);
DBMS_SQL.CLOSE_CURSOR (cur);
EXCEPTION
WHEN OTHERS
THEN
errpos := DBMS_SQL.LAST_ERROR_POSITION;
DBMS_OUTPUT.PUT_LINE (SQLERRM || ' at pos ' || errpos);
DBMS_SQL.CLOSE_CURSOR (cur);
END;

Similar Messages

  • Line 26 1084:  Syntax Error:  expecting rightbrace before end of program

    Im trying to do an animation, how do I solve Line 26 1084:  Syntax Error:  expecting rightbrace before end of program?
    package
        import flash.display.MovieClip;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        public class AvoiderGame extends MovieClip
            public var enemy:Enemy;
            public var gameTimer:Timer;
            public function AvoiderGame()
                    enemy = new Enemy();
                    addChild( enemy );
                    gameTimer = new Timer( 25 );
                    gameTimer.addEventListener( TimerEvent.TIMER, moveEnemy );
                    gameTimer.start();
            public function moveEnemy( timerEvent:TimerEvent ):void
               enemy.moveDownABit();

    I have taken your advice but now 2 errors have popped up. Line 16 1137: Incorrect number of arguments . Expected no more than 0. Line 18 1120 : Access of undefined property enemy.
    package
        import flash.display.MovieClip;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        public class AvoiderGame extends MovieClip
            public var army:Array;
            public var avatar:Avatar;
            public var gameTimer:Timer;
            public function AvoiderGame()
                    army = new Array();
                    var newEnemy = new Enemy( 100, -15 );
                    army.push( newEnemy );
                    addChild( enemy );
                    avatar = new Avatar();
                    addChild( avatar );
                    avatar.x = mouseX;
                    avatar.y = mouseY;
                    gameTimer = new Timer( 25 );
                    gameTimer.addEventListener( TimerEvent.TIMER, onTick );
                    gameTimer.start();
            public function onTick( timerEvent:TimerEvent ):void
                avatar.x = mouseX;
                avatar.y = mouseY;
                for each ( var enemy:Enemy in army )
                         enemy.moveDownABit();
                         if ( avatar.hitTestObject( enemy ) )
                                    gameTimer.stop();

  • **Error** Scene 1, Layer 'actions', Frame 1, Line 664: 1087: Syntax error: extra characters found after end of program.

    Scene 1, Layer 'actions', Frame 1, Line 664: 1087: Syntax
    error: extra characters found after end of program.
    I am new to importing classes and I have been practicing
    making a photo gallery. I am stuck and I want to know if someone
    can help me with the error I am getting.
    If it is convenient, you can download and test my .zip at
    www.dhtmlguy.freeservers.com
    Thanks in advance!

    thanks...the small stuff gets me every time.

  • Show the object and the line number, where the error happens in Forms

    Hi!
    Al lot of our programmer use the ugly when others clause to raise messages like "error <sqlcode> happens in ....". Often this hides the really error in some underlying procedures. Is it possible to call the error stack from forms like in 10g database dbms_utility.format_error_backtrace? Actually FRM-40735 hides all this information. This should be work for client and database pl/sql errors!
    With kind regards

    First of all, send every programmer in your organization a message to STOP doing that. I am afraid there is nothing you can do when you have to call some stupid code from your form that contains the when others then... sequence.
    Below is an email I sent out just two months ago. I'll share it with you:
    Hi _______,
    I looked over the _________ package to try to determine why it was so difficult to find the source of the problem. The problem was that the line number reported when the job failed was line 326, which is the Raise command at the end of the __xyz__ procedure.
    When someone writes:
          exception when others then raise;it causes line number reporting to fail when an unexpected Oracle error is encountered. Furthermore, the line does absolutely no good, because Oracle will automatically raise unhandled errors without that code.
    The only thing that code does is cause problems when someone looks for the source of a failure. Without that code, job failures can be located in just a few minutes.
    That same code sequence is repeated three times in the _________ package. The problem may also exist in the __abc___... functions that the _______.lookup_xxxl function calls, since no line numbers were reported from there, either. It would be very helpful if you would remove the problem code, and PLEASE instruct everyone on your staff to never use that sequence anywhere.
    - - - - - - - - - - - - - - - - - - - - - - end of email - - - - - - - - - - - - - - - - - - - - - -
    Now, in addition, you can trap FRM-40735 in your on-error trigger and then display the message found in DBMS_ERROR_TEXT. In fact, you might try the format_error_backtrace from there, too.

  • Netweaver not showing line number in the error file.

    Hi All,
    I am working on SAP NetWeaver 2.
    I am having a serious problem in here.
    What is happening is, In my code there is a Null pointer exception occurring frequently.
    In my log file I can see the file in which it is occurring but I cannot see the line no in which the nullpointer exception is coming.
    Is there any setting in netweaver which i should turn on to see the line no in which the error is happening.
    Thanks in Advance,
    Manny

    Hi Sam,
    Title means workflow title coming in the inbox or mail subject ?
    Anyways both the issues can be fixed in the WF itself.
    If you want to change the mail subject check your mail step and provide proper variable.
    for the workitem text you can change it form the task.
    Regards
    Bikas

  • Transaction Notification to show 'Line Number' in the Error message

    HI guys
    I been trying to get this line no. to be shown in the error message, have not tried that, is this possible?
    i did  a Notification to check on the line level, however, due to many line items, user has to check one by one, is that any way to tell user which line is having the problem
    EM, Cheers

    Hi,
    Check this document:
    How to close a discussion and why
    Thanks & Regards,
    Nagarajan

  • Scene 1, Layer 'Actions', Frame 1, Line 27     1084: Syntax error: expecting rightbrace before _01_010.

    I need help with this code PLEASE!!!!
    Stop_btn.addEventListener(MouseEvent.CLICK, fl_ClickToPauseVideo_3);
    function fl_ClickToPauseVideo_3(event:MouseEvent):void
        assets/01_01_010.fla.pause();
    Play_Btn.addEventListener(MouseEvent.CLICK, fl_ClickToPlayVideo_3);
    function fl_ClickToPlayVideo_3(event:MouseEvent):void
        assets/01_01_010.fla.play();
    Restart_btn.addEventListener(MouseEvent.CLICK, fl_ClickToPauseVideo);
    function fl_ClickToPauseVideo(event:MouseEvent):void
            assets/01_01_010.fla.seek(0);
    Tranz_Btn.addEventListener(MouseEvent.CLICK, fl_ClickToPosition_3);
    var fl_TF_3:TextField;
    var fl_TextToDisplay_3:String = "FEMA’s mission is to support our citizens and first responders to ensure that as a nation we work together to build, sustain, and improve our capability to prepare for, protect against, respond to, recover from, and mitigate all hazards.
    FEMA Hazard Mitigation efforts to reduce the risks associated with potential hazard events are ongoing. This course focuses on FEMA Hazard Mitigation Joint Field Office operations, which are established after a Major Disaster declaration to focus on mitigating the effects of future hazards in the state affected by the disaster..";
    function fl_ClickToPosition_3(event:MouseEvent):void
        fl_TF_3 = new TextField();
        fl_TF_3.autoSize = TextFieldAutoSize.LEFT;
        fl_TF_3.background = true;
        fl_TF_3.border = true;
        fl_TF_3.x = 200;
        fl_TF_3.y = 100;
        fl_TF_3.text = fl_TextToDisplay_3;
        addChild(fl_TF_3);

    every line with a forward slash has a problem.
    1.  any file paths/names should be in quotes.
    2.  i can't think of any reason you would reference an fla in actionscript
    3.  you certainly could not apply actionscript methods like play(),pause() and seek() to a fla.
    bottomline:  you almost certainly have incorrect references to what appears to be an flvplayback component instance.

  • New feature request: display number of views of TechNet Articles in My Pages

    would like to see how many times my pages / technet articles have been visited (may be with an option to make the same visible to the public).
    hope to see this feature soon, thanks!

    would like to see how many times my pages / technet articles have been visited (may be with an option to make the same visible to the public).
    hope to see this feature soon, thanks!

  • Oracle SQL Developer and Errors (Line Number Incorrect)

    First, I wanted to state that Oracle SQL Developer 2 is a standout job.
    I wanted to report, though, that when Oracle SQL Developer 2 can't compile a block of code or a simple SQL statement has invalid syntax, it does not have an option to accurately go to the line of code in question. GOING TO the erroneous line of code doesn't need to be a feature, but often times the line no. REPORTED by Oracle SQL Developer is incorrect by 50+ lines.
    Is this something I could fix on my end? I have five other developers griping about this.
    Thank you!

    I don't know if this is the situation you are talking about, but line numbers for errors in SQL in a SQL Worksheet are not line numbers within the statement but rather line numbers in the worksheet. For example, with the following SQL in the worksheet:
    select * from dual;
    select * from dual;
    select * from dual;
    select from dual;Running the "select from dual;" statement (as either statement based on cursor position, selected statement or as script), the error is reported on Line 4, Column 7. As I show line numbers (Tools | Preferences | Code Editor | Line Gutter | Show Line Numbers), this makes sense. Without line numbers showing or having the option to go to the error and with more realistic examples with SQL statements scrolling off the page, I can see that the line number in the errors wouldn't be helpful.
    I think -K- is talking about the PL/SQL code editors not reporting the correct line number based on the error line not counting the "create or replace" line at the start of a package (and more for triggers).
    theFurryOne

  • Location tempInit (what is it?) Syntax errors 1084 & 1086 in lines that don't exist.

    I am getting the following errors:
    tempInit, Line 280
    1084: Syntax error: expecting identifier before true.
    tempInit, Line 280
    1086: Syntax error: expecting semicolon before dot.
    tempInit, Line 376
    1084: Syntax error: expecting identifier before false.
    tempInit, Line 376
    1086: Syntax error: expecting semicolon before dot.
    I don't know where tempInit is in the location and I especially don't know where lines 280 or 376 are because I only have 111 lines of actionscript!  I don't know where to start.
    Any help would be appreciated.

    Pardon my intrusion.  I thought I'd throw this in since oddly enough it just showed up in the General forum today about an hour before you posted... it might have some info to help (or not).
    http://forums.adobe.com/thread/1083272?tstart=0

  • Retrieving line-number of the last error

    Hello !
    Is it possible to access the line number where the last error in a PL/SQL procedure occured ?
    At example:
    CREATE OR REPLACE PROCEDURE do_stupid
    IS
    tempNum Number;
    BEGIN
         FOR i IN 1..5
         LOOP
              temp := sysdate;
         END LOOP;
         tempNum := 2;
         tempNum := tempNum / 0;
         tempNum := 3;
    EXCEPTION
    WHEN OTHERS THEN
         -- i want to access the line-number of the error "tempnum / 0"
    END do_stupid;
    Thank You
    Florian

    If you are just trying to debug one procedure, eliminating the exception section and running it from sql*plus will cause it to return an error message that includes the line number. But this won't work if you are trying to trap the error and log it in some table or some such thing.
    SQL> CREATE OR REPLACE PROCEDURE do_stupid
      2  IS
      3    tempnum NUMBER;
      4    temp    DATE;
      5  BEGIN
      6    FOR i IN 1..5
      7    LOOP
      8      temp := SYSDATE;
      9    END LOOP;
    10    tempnum := 2;
    11    tempnum := tempnum / 0;
    12    tempnum := 3;
    13  END do_stupid;
    14  /
    Procedure created.
    SQL> EXEC do_stupid
    BEGIN do_stupid; END;
    ERROR at line 1:
    ORA-01476: divisor is equal to zero
    ORA-06512: at "SCOTT.DO_STUPID", line 11
    ORA-06512: at line 1

  • 1084: Syntax error: expecting rightbrace before end of program.

    So I'm doing this basic coding thing to make an object "shoot" bullets. It's from a tutorial video. My code matches his exactly unless I'm missing a tiny detail. Basically the code looks like this:
    package {
    import flash.display.Sprite;
    import flash.events.Event; 
    public class bullet extends Sprite {
    private var sw:Number;
    private var sh:Number;
    private const _SPEED:int=-10;
    private const _OFFSTAGE:int=-10; 
    public function bullet():void {
    addEventListener(Event.ADDED_TO_STAGE,onadd);
    private function onadd(e:Event):void {
    sw=stage.stageWidth;
    sh=stage.stageHeight;
    addEventListener(Event.ENTER_FRAME,loop);
    private function loop(e:Event):void {
    if (y<_OFFSTAGE) {
    removeEventListener(Event.ENTER_FRAME,loop);
    parent.removeChild(this);
    y-=_SPEED;
    }public function removeListeners():void {
    removeEventListener(Event.ENTER_FRAME,loop); 
    And the compiler error I'm getting says this:
    Location:bullet.as line 31 1084: Syntax error: expecting rightbrace before end of program. Source: }
    Location:bullet.as line 31 1084: Syntax error: expecting rightbrace before end of program. Source: }
    And yes it does say it twice. What's going on?
    The vid I'm learning from is this: http://autocad.spinelink.com/adobe-flash-cs4-game-tutorial-shooting.html

    You are missing two closing curly braces at the bottom of the package declaration. You need to close the package itself and the class declaration inside.
    package {
         import flash.display.Sprite;
         import flash.events.Event;
         public class bullet extends Sprite {
              private var sw:Number;
              private var sh:Number;
              private const _SPEED:int=-10;
              private const _OFFSTAGE:int=-10;
              public function bullet():void {
                   addEventListener(Event.ADDED_TO_STAGE,onadd);
              private function onadd(e:Event):void {
                   sw=stage.stageWidth;
                   sh=stage.stageHeight;
                   addEventListener(Event.ENTER_FRAME,loop);
              private function loop(e:Event):void {
                   if (y<_OFFSTAGE) {
                        removeEventListener(Event.ENTER_FRAME,loop);
                        parent.removeChild(this);
                   y-=_SPEED;
              public function removeListeners():void {
                   removeEventListener(Event.ENTER_FRAME,loop);

  • 1086: Syntax error: expecting semicolon before rightparen. ?

    Hi there i'm currently working on my year 13 ICT coursework using Adobe flash CS5.5 and while correcting an error while implementing a third party found image gallery another one appeared, which I am completely unable to fix.
    At the moment I would like the image gallery to be implemented in Scene 3 of my product, but it seems when opening to view the product it just spams through all the scenes and I am confused on why this is the case?
    If anyone can help with this then it would be much appreciated.
    Here is the code line which has the Syntax error, if any other thing are needed please just ask.
    lastBildeHL.onLoadProgress = gotoAndPlay("Scene 1")); numBytesLoaded:Number, numBytesTotal:Number):void
    Thanks

    Hi there just added that line and when doing so I then got these errors:
    Scene 3, Layer 'actions', Frame 5, Line 131
    1084: Syntax error: expecting rightparen before colon.
    Scene 3, Layer 'actions', Frame 5, Line 131
    1078: Label must be a simple identifier.
    Scene 3, Layer 'actions', Frame 5, Line 132
    1084: Syntax error: expecting identifier before var.
    Scene 3, Layer 'actions', Frame 5, Line 132
    1078: Label must be a simple identifier.
    Here are the actions:
    lastBildeHL.onLoadProgress = gotoAndPlay("Scene 1", numBytesLoaded:Number, numBytesTotal:Number):void
        var numPercentLoaded:Number = numBytesLoaded / numBytesTotal * 100;
    Any help would be good
    Thanks,
    Joe

  • Syntax error fix needed for "...getHelperForLanguage: function(language) null,..."

    Getting the syntax error, and having limited technical experience, I do not know how to fix the problem. This is in regard to a web site asset, an mp3 file. I am having problems getting such files to play within Chrome (though they play in Internet Explorer, for instance), so I am trying to troubleshoot from within Dreamweaver, as well as from the Chrome extensions side.
    Here is the line including the syntax error, with additional lines
        getInterfaces: function(countRef) {
            var interfaces = [Ci.nsIDOMGeoPositionCoords, Ci.nsIClassInfo, Ci.nsISupports];
            countRef.value = interfaces.length;
            return interfaces;
    getHelperForLanguage: function(language) null,
        contractID: "",
    Thanks for help.

    Use HTML5 <audio>. 
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 Audio Demo</title>
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    </head>
    <body>
    <audio controls>
    <source src="path/yourSong.ogg" type="audio/ogg">
    <source src="path/yourSong.mp3" type="audio/mp3">
    <p>Ooooops.  Looks like your browser is out of date and doesn't support the audio tag.  Please upgrade to a modern browser.</p>
    </audio>
    </body>
    </html>
    Nancy O.

  • 1084 Syntax errors. Very basic.

    I am very new to flash and I have some very basic code that I need help with.
    Here;
    var paddlepos:int = paddle.x.position
    if; (paddlepos > 253)
        paddle.x.postition = 253;
    The errors are:
    Scene 1, Layer 'Actions', Frame 1, Line 28    1084: Syntax error: expecting rightparen before leftbrace.
    Scene 1, Layer 'Actions', Frame 1, Line 27    1084: Syntax error: expecting leftparen before semicolon.
    Help would be very helpful. Thanks.

    there should be no semi-colon after if.

Maybe you are looking for

  • How can I search my creative cloud files online - Missing in action??

    I love creative cloud so park the hate for asking this question please! I might be missing something rather obvious but I can't find it for the life of me. I have turned off synching (yes I know cardinal sin!) But the local files are consuming far to

  • TS4006 Is there ANY way to locate my iPod Touch if it's offline

    My iPot Touch was either lost or stolen last week in Vegas.  I have it registered on my iCloud "Find my Phone" but it simply comes up as offline, which doesn't surprise me since the battery has probably run out!  Does any one have ideas on what else

  • Change of Cash Discount GL number

    Hi, Right now discount taken by customers for 2 sales office is going to 12345 gl account. Now I need to change the discount Gl account number for these 2 sales office to 54321. Can anyone let me know where do i need to make the change thanks

  • Problem with the flex and the webservice

    Hey everyone, I have a problem with flex; I declared a web service ( that I test it and it works ) inside flex and declared also the operation. But it seems that flex doesn't recognize the web method so when i use something like ws.Getheader.send() i

  • HAI (Home Arch Install) - install packages without root account

    HAI, or Home Arch Install, can "install" and run Arch Linux programs from your normal user account. (Even if you don't run Arch Linux at all - see the config file.) HAI's design is heavily inspired by Zero Install, but it uses Arch Linux packages ins