How journal line number alongwith SQLCODE and SQLERRM?


It is suggested (for example, Tom Kyte recommends this) that what follows is a good way to put the implementation of the clause WHEN OTHERS...



{color: #800080} while others
then
log_error (...); -error log is an autonomous transaction
LIFT;
end; {color}




.. If I use this way, line number where the error occurred is not revealed.

Which is the way I can connect code-line-number real and SQLCODE and SQLERRM one table of newspaper.
Also, I have to throw the same to the customer. The use of STIMULUS raises the line number of STIMULUS.




Thank you
Sam

Depending on your version of Oracle (this feature has been added in 10 g), you can use: DBMS_UTILITY. FORMAT_ERROR_BACKTRACE.

The following article highlights its capabilities: [PL/SQL: tracing lines | http://www.oracle.com/technology/oramag/oracle/05-mar/o25plsql.html |] [PL/SQL: tracing lines]

Simple example:

SQL > edit
Wrote file sqlplus_buffer.sql

  1  DECLARE
  2     bad_number      NUMBER;
  3  BEGIN
  4     bad_number := TO_NUMBER('A');
  5  EXCEPTION
  6  WHEN OTHERS THEN
  7     DBMS_OUTPUT.PUT_LINE(DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
  8     RAISE;
  9* END;
SQL > /
ORA-06512: at line 4

DECLARE
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at line 8

I hope this helps!

Tags: Database

Similar Questions

  • How to convert number in date and time in labview

    Hi all

    I have a hexadecimal string and converted into a number. Now this number to display in the format of timestamp. Uses the format of the time Unix.

    By using this link, I can convert this number to timestamp.  http://www.UnixTimeStamp.com/index.php

    But how it should be done in LabVIEW? I know it may be simple, but please help.

    I enclose my VI for referance.

    Thank you

    Manisha

    Hi Man_Can,

    You can add the origin of UNIX timestamp to your number:

  • How can I know the number of columns and lines on excel file

    How reading the number of columns and rows on an excel file after you open the file in excel with ActiveX.

    Using the example of excel200dem, I read that the file data is excellent.

    However, in this example, I just give the number of lines and columns.

    I want to know the number of lines and columns not giving those in C code automatically.

    Who knows this things? -?

    Help me please.

    Hello

    (1) this forum provides a search option, you must use in doing so, you will find this post

    (2) don't solve you your earlier questions? If so, you must mark responses that have helped you find a solution.

  • How to query the total number of columns and lines filled with data?

    How to get the number of rows and columns in Exel file data using Excel report?

    Since you have posted this question in the forum of LabWindows/CVI, I guess you want to know how to do with CVI.

    You need to know how to open and activate the Excel data file.

    Depending on the function returns the total number of columns and lines col_count row_count, respectively.

    -----------------------------------------------------------------------------------------------------------------------------------------

    int CountColumnsAndRows (void)
    {
    Error HRESULT = 0;
    CAObjHandle rangeCurrentRegionHandle = 0;
    CAObjHandle rangeColumnsHandle = 0;
    CAObjHandle rangeRowsHandle = 0;
      
    unsigned long col_count = 0, row_count = 0;
      
    Must use the 'A1' property and CruuentRegion count the total of columns and lines, including the drafts!
      
    error = CA_VariantSetCString (& MyCellRangeV, 'A1');
      
    error = Excel_WorksheetRange (ExcelWorksheetHandle, NULL, MyCellRangeV, CA_DEFAULT_VAL, & ExcelRangeHandle);
    If (error<0) goto="">
      
    error = Excel_GetProperty (ExcelRangeHandle, & ErrorInfo, Excel_RangeCurrentRegion, CAVT_OBJHANDLE, & rangeCurrentRegionHandle);
    If (error<0)  goto="" error="">
      
    error = Excel_GetProperty (rangeCurrentRegionHandle, & ErrorInfo, Excel_RangeColumns, CAVT_OBJHANDLE, & rangeColumnsHandle);
    If (error<0)  goto="" error="">
      
    error = Excel_GetProperty (rangeColumnsHandle, & ErrorInfo, Excel_RangeCount, CAVT_LONG, & col_count);
    If (error<0) goto="">
      
    error = Excel_GetProperty (rangeCurrentRegionHandle, & ErrorInfo, Excel_RangeRows, CAVT_OBJHANDLE, & rangeRowsHandle);
    If (error<0)  goto="" error="">
      
    error = Excel_GetProperty (rangeRowsHandle, & ErrorInfo, Excel_RangeCount, CAVT_LONG, & row_count);
    If (error<0) goto="">

    Error:

    CA_VariantClear (& MyCellRangeV);
    CA_VariantClear (& MyVariant);
    ClearObjHandle (& ExcelRangeHandle);
    ClearObjHandle (& rangeCurrentRegionHandle);
    ClearObjHandle (& rangeColumnsHandle);
    ClearObjHandle (& rangeRowsHandle);
      
     
    If (error<>
    ReportAppAutomationError (error);
      
    error return;
    }

  • ﷯Error - error message: an element on the page "News" at location 33 642 requires the pixelation, but is too large to rasterize. Resize it smaller and try again... I can't fix this or find that the line number.  How can I find this line?

    ﷯Error - error message: an element on the page "News" at location 33 642 requires the pixelation, but is too large to rasterize. Resize it smaller and try again... I can't fix this or find that the line number.  How can I find this line?

    I don't know why it worked, but I changed the police and was able to download Web site.  Thanks for your help!

  • I tried to view my tabs on other computers and received this message: XML Parsing Error: undefined entity location: on: sync-tabs line number 7, column 1: the window id = "tabs-display" ^ How can I fix?

    "Error message has been: XML Parsing Error: undefined entity location: on: sync-tabs line number 7, column 1: window (weeks =" "3 =" "4 =" "5 =" "7 =" "< =" "^ =" "a =" "Add - on. =" "it y =" ' am = "" a = "" and = "" are = "" avg = "" believe = "" time = "" but = "" impossible = "" some = "" computers = "" firefox = "" for = "" I = "" I = "" id = 'tabs-view' in = "" installed.. = "" it = "" months) = "" = "" on. "" "" "" "" = "" or = "" other = "" p = "" paid = "" remember = "" running = "" sometimes = "" sync = "" tabs = "" version = "" look a = "" was = "" we = "" some = "" when = "" windows = "" worked = "" > < / window > "

    Hello!

    Can you give us some details? When this message display? Is in your phone or your computer? What is your language? More information you can give us the best.

    You use the add-on and Firefox 4? If so, I'll ask you to disable and remove the add-on: Sync is now part of the Firefox browser and you don't need the add-on. [https://bugzilla.mozilla.org/show_bug.cgi?id=644894 some users solved this problem by uninstalling the add-on.]
    ]

  • Programmatically set the size of a table control (not the number of col and lines)

    Hi all

    I am trying to create a little VI, in which the user selects the number of columns and rows in a table, and after clicking on a button 'OK', the table control is displayed in the control panel (to be filled in by the user). To do this, I use the nodes property to the number of columns and lines. I have no problem with that.

    However, I want to "limit" the size of the control table (control of himself, not the dimensions of the table) and make use of vertical and horizontal table, the scroll bars. I want to avoid it is that passes type 100 user and 100 lines and appears a huge table control.

    I could tho this by using an array instead of an array, via the node property "size", but I would use an insead table a table.

    Thank you very much

    Daniel

    With a table control, you cannot set the display size to be anything other than a multiple of a complete cell.

    If you are limited to a number of lines and columns.  If you want to resize with more control you also need to resize the control within the Bay, accessible via the property 'picture Element '.

    Another option (but seems huge exaggerated) is to place your table in a secondary and set the size of the secondary to the size you need and enable scrollbars for her.  It is not an option that I would choose but if it helps...

    Have it, your description of your user interface sounds not very intuitive.  How the user knows at any time exactly what cell they access if they have to scroll backwards?

  • How to show the two original and change the line

    I have a table looks to and it store the two original and change lines, how can I get the Original lines both edit? In this case, I want to display the first two lines (all columns are composite keys)

    In the meantime, I use more Partition BY with line number, but I get a line

    flag

    APPNO

    EXAM

    TYPE

    EXAM

    YEAR

    EXAM

    MONTH

    Object

    Origin

    1234567890

    HL

    2015

    01

    Art and Design

    Edit

    HL

    2015

    01

    Art and Design

    origin

    SL

    2015

    01

    Math

    New

    SD

    2015

    01

    English

    Please check this one, I think it can meet your needs.

    SQL> with meta_data (flag,APPNO,EXAM_TYPE ,EXAM_YEAR ,EXAM_MONTH,SUBJECT)
      2          as (select 'Origin',1234567890,'HL',2015,01,'Art and Design' from dual union all
      3                  select 'Edit',1234567890,'HL',2015,01,'Art and Design' from dual union all
      4                  select 'origin',1234567890,'HL',2015,01,'Math' from dual union all
      5                  select 'New',1234567890,'HL',2015,01,'English' from dual )
      6  select *
      7    from meta_data
      8  where exists ( select 1
      9                             from meta_data outer
    10                           where flag ='Edit'
    11                              and meta_data.APPNO          =outer.APPNO
    12                              and meta_data.EXAM_TYPE          =outer.EXAM_TYPE
    13                              and meta_data.EXAM_YEAR          =outer.EXAM_YEAR
    14                              and meta_data.EXAM_MONTH          =outer.EXAM_MONTH
    15                              and meta_data.SUBJECT          =outer.SUBJECT)
    16  /
    
    FLAG        APPNO EX  EXAM_YEAR EXAM_MONTH SUBJECT
    ------ ---------- -- ---------- ---------- --------------
    Edit   1234567890 HL       2015          1 Art and Design
    Origin 1234567890 HL       2015          1 Art and Design
    
    SQL>
    
  • How to export data to excel that has 2 tables with the same number of columns and the column names?

    Hi everyone, yet once landed upward with a problem.

    After trying many things to myself, finally decided to post here...

    I created a form in form builder 6i in which clicking on a button, the data gets exported to the excel sheet.

    It works very well with a single table. The problem now is that I cannot do the same with 2 tables.

    Because the tables have the same number of columns and the columns names.

    Here are the 2 tables with column names:

    Table-1 (MONTHLY_PART_1) Table-2 (MONTHLY_PART_2)
    SL_NOSL_NO
    MODELMODEL
    END_DATEEND_DATE
    U-1U-1
    U-2U-2
    U-4U-4
    ..................
    ..................
    U-20U-20
    U-25U-25

    Given that the tables have the same column names, I get the following error :

    402 error at line 103, column 4

    required aliases in the SELECT list of the slider to avoid duplicate column names.

    So how to export data to excel that has 2 tables with the same number of columns and the column names?

    Should I paste the code? Should I publish this query in 'SQL and PL/SQL ' Forum?

    Help me with this please.

    Thank you.

    Wait a second... is this a kind of House of partitioning? Shouldn't it is a union of two tables instead a join?

    see you soon

  • How to link payments AP with newspaper Journal lines

    Hello

    I have two payments into the accounts payable and those transferred to GL modules.

    How to follow the corresponding journal lines? I can write a query but want to know the columns for the news

    Hello.

    You will need to know the CHECK_ID to payments. You can use:

    SELECT * from gl_je_lines
    WHERE reference_3 in (the check_id entry)
    AND REFERENCE_4 in ('enter payment numbers")
    AND REFERENCE_10 = 'CASH '.
    AND reference_6 = 'Payments AP'
    AND set_of_books_id =

    If you have a lot of records, this query may take a little long.

    Hope this helps,

    Octavio

  • How can I get number of rows in DB for view with "only up to line number.

    Hi all

    I use jdeveloper 11.1.1.3.0

    in the development of the object view, only until the line number is set to 100, but it has 1000 row in DB.

    now page jspx, I need to get the number of rows in db (1000), how can I get it?

    If I get iterator or view are of the object status is not true, it returns the value 100.

    How can I get 1000?

    Given that you have set the limit line number for the VO, VO will always and forever don't have 100 records or less. If you want the total number in the comic book, you need to create an another VO that is not the count (*) or one that does not limit the number of rows.

    John

  • How to display the number of dynamics and the progress bar graphic on the title of the region

    Hello

    I have several show/hide parts of a report on a dashboard page. When the user comes to this dashboard page, it see areas collapsed and a status appropriate for each region and click on the region concerned the status listed in the title bar of region-based. Each region show different reports as "Exits", "Tasks", "Communiqué of progress" etc., for example, the user want to see the number of questions and tasks as a number displayed on the side right of the 'from', 'Tasks' area, in the same line as the title of the region. In addition, the user wants to see a progress bar graphic of liitle for the region 'Progress of the liberation' displayed on the right side of the area, in the same line as the title of the report. I have the return function to get these numbers and the graphic progress bar, but do not know how to post them on the right side of the area in the same line as the title of the region. all the ideas are really appreciated.

    Thanks for your time,
    Surya

    Seems interesting. Could create an example on apex.oracle.com experiment?

    Try this approach:

    Create an item hidden in each region to receive these values of synthesis (e.g. P1_DASH_TASK_COUNT) and calculate them the or some functions in regions before calculations.

    These values using the notation of substitution in the region of reference titles:

    Tasks &P1_DASH_TASK_COUNT.
    

    This can then be styled with CSS to get the look required, starting with:

    .dash-summary {
      float: right;
    }
    

    Exactly what is required in the CSS will depend on the theme/template used, why it would be a good idea to see on apex.oracle.com.

  • How to find a line number in excel

    Hello

    I need help to find line number in excel.

    Actually what I try to do is, I use the scanner to read the barcode (string) then I need to search for the same string in the excel file (my datas are recorded as like this for ex: in line 5, column 1 I have to chain column 2 column 10 (West) I have certain values). Now when my string corresponds to the West his will display values from column 2 to 10, so I have to find which line matched the West channel number.

    Thank you

    The search through the forums helps a lot. Here is a discussion where I've solved your problem.

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=200494&jump=true

    For more information and some samples VI and tool kits, you can go to the excel Council

  • How to increase the number of user and a guest on laptop?

    By mistake I changed the number of user and it a how I could do so I odnt remember, but now I want to change new so that I can active comments as another user account, please let me know how to change a favor to active clients

    I now have Vista OS. before I could do guest account can be used but I dnt remember but somewhere I made a change which required the number of users on the desktop I have 1 now, I forgot

    to please tell me where this option, so I can do it again it 2 or 3 by the guest account now do either not connect you he says that this service is not available and cannot be connected

    Hi James,

    Maybe this will help:

    http://www.Vistax64.com/tutorials/93009-user-account-create.html

    http://www.Vistax64.com/tutorials/126933-guest-account-turn-off.html

    I hope this helps.

    Good luck!

  • We can add a button to the BP to approve Budget so that it can read all the charges in question cost journal line and auto fill on the grid.

    Hi all

    We can add a button to the BP to approve Budget so that it can read all the charges in question cost journal line and auto fill on the grid.

    Let's say I have a cost with 5 code cost journal

    Code 1 price

    2 cost code

    Code 3 cost

    Code 4 cost

    Code 5 cost

    BP budget approval, after that I click on New, can I add a button to the tab the line items so that when I click on this button, it reads all codes of cost in the cost journal and auto fill on the grid?

    You can create a new 'model' BP for this purpose. Line item type. Then add a line manually with a cost on each code. Then you can use the copy in your BP BA record consolidate the function to copy the line items to the new folder of BP (including all cost codes) into your folder of BA. That is to set up a model record once with all cost codes and then copy consolidate billing it to all lines new record of BA. would this work?

Maybe you are looking for