How to make SQL * more count the comment and blank line numbers?

Hello

Parameter
Value of the parameter
Oracle versionEnterprise Edition Release 11.2.0.1.0 - 64 bit
OPERATING SYSTEMLinux Fedora Core 17 (X86_64)

I would like to know, is it possible to force SQL * Plus to provide the number of the current in the source file line whenever there is an error? I often put in the first line of my script SQLBLANKLINES the VALUE ON that I may be able to put several consecutive blank lines in my code (I do that sometimes, when I find that it is appropriate to make my code more readable or a sequence of instructions which I believe make their logic more comprehensible for the reader of the Group)

Now the problem is that SQL * Plus will ignore these empty lines and whenever there is an error, the line number in the error message does not match the actual line number in the source file, but it seems to be the last non-empty line in the file.  Consider the following example:

SET SQLBLANKLINES ON;

DECLARE
    var PLS_INTEGER := 10;
BEGIN


   
    var := 20
END;
/

In the code above on line 9 (also counting blank lines), there is an error (no semicolon at the end of the var: = 20) but when I run the script

SQL * also, here is the error message I get


SQL > @myscript.sql;

END;

*

ERROR on line 8:

ORA-06550: line 8, column 1:

PLS-00103: encountered the symbol "END" when expected in the following way:

* & = - + ; <>/ is mod remains not rem

< an exponent (*) > <>or! = or ~ = > = < = <>and like2 or

like4 likec between | submultiset of type multiset Member

The symbol ';' was replaced by 'END' continue.


SQL >


As you can see the error message indicates that the error was found on line 8, while in the file, it's really on line 9

As long as the number of lines in the script is limited, this may not be a problem and we can quickly find the actual line number in the code that causes the error, but for a code, including hundreds (or even thousands) of lines and with many comments and blank lines, find line number given by SQL * error message more becomes complicated.

So my question: is it possible to make SQ * more properly draw the line numbers, as they appear in the source file?

Thanks in advance,

Kind regards

Dariyoosh

Hi, Dariyoosh,

The line numbers in error messages are always from the beginning of the statement, but not the file.  The back-end which checks the errors and generates the error message, has no idea if this statement has appeared in your file, even if the statement was in a file at all, or if it comes from multiple files, each with its own line 1.

You can divide your scripts into parts, so that the long statements, which may lead to error messages, are each in a separate file, so the statement starts on the line 1 of the file.

For example, you can call a script called fubar.sql, which looks like this:

SET SQLBLANKLINES ON;

@@fubar_1

Which calls another script, called fubar_1.sql, located on the same directory as fubar.sql, that looks like this

DECLARE
    var PLS_INTEGER := 10;
BEGIN

    var := 20
END;
/

You never call him directly fubar_1.

Tags: Database

Similar Questions

  • How to make a backup of the drivers and applications

    I have a HP Pavilion Desktop PC all-in-one 23-B115EA, originally with Windows 8 installed which I have updated to 8.1 of the store.  After a problem, I was advised to create a System Image on an external hard drive, what I've done.  I also have a recovery disk including the recovery on a USB Partition and a new Restore Point.

    The reason why I write, is that what follows has been also sugested "Furthermore, make a backup of the drivers and Applications.» Still, if the hard drive needs to be replaced, you will need to install all the drivers and perhaps some applications again for which you have this backup. "I don't know how to do on the PC and I was wondering if it was possible.

    Best regards, Mike-01

    Mike, you're welcome.

    I know that in the past, there are third-party programs that could back up the drivers, but I could not find one to win 8.1.  With respect to applications, the CD recovery and Image will be all you need.

  • RH10. How to make home button on the toolbar and of home in the box "breadcrumbs" link to go to the same location

    (I don't know what the problem is with the editor of these days. Only choice is HTML with tags or this editor who suddenly decided to put my text in italics and not let me remove it! He already let me create line breaks. )

    I use: RoboHelp WebHelp Pro Single Source Layouts, 10 (albeit without using RoboHelp Server).

    I have five SSL, each with their own unique contents. The table of contents for each licensed module includes basic help topics.

    • Basic Help
    • Help for module 1 licensed
    • Help for module 2 license
    • Help for module 3 licensed
    • Help for module 4 licensed

    The default theme using base is "Introduction.htm. The default theme of each licensed module is the theme of introduction for this add-on.

    In the basis of the help by clicking on the button Home in the toolbar opens "Introduction.htm. By clicking on the Home link in the region of breadcrumbs, for example ""Homepage > Management Data Sources > creating a database ", also opens 'Introduction.htm'."

    In a license module, click on the home button in the toolbar opens "Introduction.htm. BUT, by clicking on the Home link in the region of breadcrumbs, for example "Homepage > analysis of the loss, opens the introductory section of the module under license." Our QA group filed a bug against this behavior. They feel that by clicking on the Home button and clicking on the link home takes you to the same place.

    All modules use a common window with a display two-pronged and all the WebHelp Pro buttons, including "home (skin: help NGP)" selected.

    They also use a common skin. The home button properties are: name of the item and the text = "Home". Links of "Introduction.htm" button, with a dependence on "Release\Core\Introduction.htm".

    Is there an easy way to achieve the results expected by the AQ, where clicking on host always opens "Introduction.htm", while authorized opening assistance always opens the introductory topic for the module? DISCLAIMER: I do not know how the script, if it is a possible solution.

    Thank you.


    Carol

    LOL, "all this said, the WebHelp Pro has worked quite well without HR server."

    And yet, here you ask about solving a problem, right?

    I think you should study serously ordinary passage to WebHelp. So much more than you report problems with the behavior of the toolbar buttons and the behaviour of the breadcrumbs.

    The reason is that RoboHelp Server maintains some of this aspect when you publish the content out there. So I'm not surprised to see point out you inconsistent behavior with different "modules". I guess it's an installation "merged"?

    See you soon... Rick

  • A question about the order of the COIL and blank lines

    Hello everyone,



    I have a question on the order of the COIL. Here is the syntax of my sql script file
    HOST SET NLS_LANGUAGE=FRENCH_FRANCE.WE8MSWIN1252;
    SET SQLBLANKLINES ON;
    SET TRIMSPOOL ON;
    SET SERVEROUTPUT ON;
    SET LINESIZE 10000;
    SET PAGESIZE 10000;
    SET COLSEP '|';
    SET HEADING OFF;
    SET ECHO OFF;
    SET FEEDBACK OFF;
    SPOOL result.txt
    
    
    -- And here I write my sql queries.
    
    
    SPOOL OFF;
    It works quite well, and every time the script is run, the file ' * result.txt "* contains the result of the request." " However, whenever there is a blank line at the beginning of the file ' * result.txt* '. I don't know why this unwanted blank line is inserted automatically whenever I run my script. I have to delete manually (otherwise I have problems with my script Unix interpret these files) and as I have several files to update, this could be your time. Is it possible to get rid of this unwanted blank line?


    Thanks in advance,


    Kind regards
    Dariyoosh

    SET PAGESIZE 0;

  • How to make a backup of the health and activity data?

    Hello

    I would like to do a fresh install on my iPhone version 6s 9.3 to 9.3.2. My question is how can I save only the data of health and activity?

    I couldn't find any option in iTunes or iCloud backup specific applications. Please notify.

    -Salah

    Hi Salah

    It is not currently possible to only back up data of health and activity through Apple backup and restore process.

    Health and activity - as well as other sensitive (like password) information - data are included in encrypted iPhone backups.

    It is possible to exclude these data from a backup (by a backup encrypted United Nationsvia iTunes), but it is not possible to only backup and restore sensitive data.

  • How to make a new account the standard and standard account manager account is on parental controls.

    first of all Hi there.

    I have windows 7 and I put a parental account for my kids but the big mistake I did there is no administrator account on my laptop.
    Now, every time I do anything it's parental control and I can not even a new account administrator due to parental account.
    so please unraveling me is the way to make a new administrator account by account standard and parental settings on the standard account.

    When you have loaded Windows for the first time, then you have been invited for an account name and a password. This account is an administrator account. You must now use it when creating new accounts.

  • How to make a lock off the internet so I can have another WiFi computer using the internet

    How to make a lock off the internet so I can have another WiFi computer using the internet

    you do not take the lock itself.

    Instead, you configure another computer with security information to access the connection Wireless secure.

    Unfortunately, we cannot help you with this, because we cannot tell if you are the owner of the wireless connection or someone trying to hack it via another computer.

    However, what you can try is to contact technical support that provides your internet service.  they will be well to validate your identity and then provide help or more detailed instructions.

  • How to make someone to sign the document within my documents in the tasks that I specify?

    How to make someone to sign the document within my documents in the tasks that I specify?

    Hello form signature,.

    Yes, you can place the signature to a particular position field in the document as follows:

    1. connect to EchoSign account.

    2. Enter the e-mail address of the recipient.

    3. download the document.

    4. check "Preview, the Signatures of Position or add form fields" and click Next.

    5. in the preview page, drag and drop the signature and other fields of the form if necessary in the document.

    6. once the fields are placed, press Send.

    Here is the link:

    http://helpx.Adobe.com/EchoSign/KB/hub7.html

    Let me know if you need more information.

    Kind regards

    -Usman

  • How to make a folder shows the number of files in there?

    How to make a folder shows the number of files in there?

    You have not indicated what OS you are using.

    Yosemite

    Action > View Options: Select to display the item of information

  • I'm trying to connect on Apple TV.  It keeps generating a 6-digit verification code, sent to another device.  I need a 4 digit or need to know how to make a space on the verification code entry screen

    I'm trying to connect on Apple TV.  It keeps generating a 6-digit verification code, sent to another device.  I need a 4 digit or need to know how to make a space on the verification code entry screen

    Read this noting the last two paragraphs:

    For Apple ID - Apple Support two-factor authentication

    You can try to add on your suggested such password or disable the service and then connect.

  • How to make an arch on the topic title?

    How to make an arch on the topic title?

    You can do the following entirely in any version of Pages because the text on a path is not supported. The News Gothic 'gate' in one area of text Pages. The arc of text was done in HTML5 Canvas with Javascript, then saved as a .png image, which was dragged/dropped into Pages v5.6.1. Normal means to create text curvilinear (CRA) is done by an application chart non-Apple.

  • the friends hyii UA HUD need help how to make a backup of the files from his deleted with (shift + delete) memory card

    the friends hyii UA HUD need help how to make a backup of the files from his deleted with (shift + delete) memory card

    Hello

    It seems that you want to restore the files removed from the memory card.

    I will definitely help you with this.

    I would say you can search the Internet for data recovery software by using your favorite search engine.

    Warning: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    It will be useful. If you have any other questions, feel free to let us know. We will be happy to help you.

    Thank you.

  • How to make a backup of the system files?

    I want to just back up the filesystem in the case where.

    Hello

    You can save your own personal files (documents, photos, etc.) or do a complete PC backup that contains the system files.

    If you want to make a complete PC Backup or a backup file only, buy an external hard drive.

    Only Vista professional, comprehensive and company have the opportunity to make complete backups of PC.

    All editions of Vista can do backups of files.

    Here's how to back up and restore your files:

    "How to back up your data.

    http://www.wintuts.com/how-to-backup-your-data

    http://www.home-PC-help.com/windowsvistabackup.html

    "How to restore your files.

    http://www.wintuts.com/how-to-restore-files

    This is how to do a full backup of the computer and how to restore it (for Vista Business, Ultimate and Enterprise only):

    «How to make a backup of the computer in Vista»

    http://www.bleepingcomputer.com/tutorials/how-to-use-Vista-complete-PC-Backup/

    "How to restore a full backup of the computer.

    http://www.bleepingcomputer.com/tutorials/Windows-Vista-complete-PC-Restore/

    FAQ from Microsoft about backup and restore:

    "Back up and restore: frequently asked questions.

    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-and-restore-frequently-asked-questions

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    There are a number of 3rd party programs available for a full backup of the computer; others, you must pay for, some are free.

    This program must be purchased:

    "Acronis True Image".

    http://www.Acronis.com/homecomputing/products/TrueImage/index_gwo.html?utm_expid=4274314-6

    These are free programs for the protection of the computer:

    "EaseUS Todo Backup free"

    http://www.TODO-backup.com/products/home/free-backup-software.htm

    "Download Backup & Recovery 2012 free FREE!

    http://www.Paragon-Software.com/home/BR-free/download.html

    «Macrium Reflect FREE Edition»

    http://www.Macrium.com/reflectfree.aspx

    ___________________________________________________

    And if you do not score a manufacturer of recovery on your hard drive, you should be able to make your own recovery discs that are system files in order to reinstall the operating system.

    Go to programs > name of the manufacturer of your computer > then their system or recovery tools software topics for them, depending on how it is formulated.

    If you can't find any reference to it, contact the manufacturer for advice on how to make these recovery disks.

    See you soon.

  • How to make a backup of the Windows BACKUP DELL?

    I have a Dell 0ptiplex 3010 with windows 7 pro 32 bit 10 units.
    How to make a backup of the Windows BACKUP DELL?
    Please help, I'm still confused with BACKUP DELL.

    Hi rahar_satriyo,

    Only the version complete Dell backup and restore will give you an option to backup computer image which is a paid version. The default Basic that comes with the system version will have only the restore factory in image.

  • How to make a CC off the power of a laptop so I can put it on a second desktop computer

    How to make a CC off the power of a laptop so I can put it on a second desktop computer

    You can simply disconnect from the Adobe Creative cloud to disable subscription:

    https://helpx.Adobe.com/creative-cloud/help/sign-in-out-activate-apps.html

    No need to uninstall to disable CC apps on a particular computer, but if you want you can uninstall it.

Maybe you are looking for

  • version 12.4 no right click the option of reading

    As long as I can remember, while a song is being played in iTunes, I could select right-click on another song and play the new selected song immediately.  With version 12.4, that I don't see that I can do it longer.  When I select and right click on

  • IP Helper stop working

    I have had this problem for about a week nowHere is the full error message, I am using Windows server 2008can you guys please help Signature of the problem:Problem event name: BEX64Application name: svchost.exe_iphlpsvcApplication version: 6.0.6001.1

  • Backup more Seagate external drive "unsupported"?

    I want to use my Seagate Backup Plus 5 to, a network connected to the USB 3.0 port on my Linksys WRT1900AC wireless router. When the connection is established, the router recognizes the backup more, however it is not mapped it as an available network

  • white screen on startup of Windows7 Pro on my PC

    My PC worked perfectly just three hours, but when he starts again this afternoon, I have a white screen and nothing else.  I can't get into safe mode, or do NOTHING at all.  I rebooted several times, but without success - all I get is a white screen.

  • "Add shortcut to the taskbar" option is missing from the context menu

    I was able to use this option to add or remove shortcuts to.from the taskbar.This option is no longer visible in the context menu.How to restore these options?