How to find exact error column name
hi all ,
My requirement is as follows .
I am trying to add a record into temp_emp table inside plsql block ,after executing it i am getting ORA-01438: value larger than specified precision allowed for this column error .I want to find for which column the error is coming .
In the below example i clearly know that deptno column precision is 2 and i am inserting bigger value that is why i am getting error .
let us consider a scenario where i am trying to insert 40 colunm values into table and one column is causing the problem , how to find that column alone .
SELECT * FROM V$VERSION
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Solaris: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
CREATE TABLE
temp_emp
empno NUMBER(4),
ename VARCHAR2(15),
job VARCHAR2(10),
deptno NUMBER(2)
DECLARE
v_empno NUMBER (4);
v_ename VARCHAR2 (15);
v_job VARCHAR2 (10);
v_deptno NUMBER (2);
BEGIN
INSERT INTO temp_emp
(empno, ename, job, deptno
VALUES (1234, 'ABC', 'CLERK', 1000
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ( SQLCODE
|| DBMS_UTILITY.format_error_backtrace
|| SQLERRM
END;
/finally I want column name in the error message .
Thanks,
P Prakash
Oracle does not provide the column information in the error message and I don't know of any way to do so outside of developing something convoluted. For example:
SQL> DECLARE
2 te_row temp_emp%ROWTYPE;
3 BEGIN
4
5 te_row.empno := 1234;
6 te_row.ename := 'ABC';
7 te_row.job := 'CLERK';
8 te_row.deptno := 1000;
9
10 INSERT INTO temp_emp
11 VALUES te_row;
12 END;
13 /
DECLARE
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: number precision too large
ORA-06512: at line 8Also, that EXCEPTION block has a bug in it (no RAISE or RAISE_APPLICATION_ERROR).
Edited by: Centinul on May 3, 2012 8:23 AM
Similar Messages
-
How to find internal table column names
Hi Friends,
I have declared one internal table with 45 fields.
Here is my situation.
I need to create dynamic table with all above 45 fields and some more fields (approx 10 fields).
I got the solution for creating dynamic table. Only thing is
I have to assign all the above 75 columns to other internal table.
is there any way we can read internal table field names in the program.
we can acheive this by hard coding the all 75 field names.
since it is 75 columns, i want to pass one by one field dynamically to the other table.
Pls give me a solution.
thanks in advance.HI,
Find the code for dynamical internal table., which helps to increase the fields in the internal table dynamically.
REPORT ZTEST_R3.
FIELD-SYMBOLS: <L_TABLE> TYPE TABLE,
<L_LINE> TYPE ANY,
<L_FIELD> TYPE ANY.
DATA: IS_LVC_CAT TYPE LVC_S_FCAT,
IT_LVC_CAT TYPE LVC_T_FCAT.
DATA: NEW_TABLE TYPE REF TO DATA,
NEW_LINE TYPE REF TO DATA.
START-OF-SELECTION.
IS_LVC_CAT-FIELDNAME = 'KUNNR'.
APPEND IS_LVC_CAT TO IT_LVC_CAT.
IS_LVC_CAT-FIELDNAME = 'NAME1'.
APPEND IS_LVC_CAT TO IT_LVC_CAT.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_LVC_CAT
IMPORTING
EP_TABLE = NEW_TABLE.
*Create a new Line with the same structure of the table.
ASSIGN NEW_TABLE->* TO <L_TABLE>.
CREATE DATA NEW_LINE LIKE LINE OF <L_TABLE>.
ASSIGN NEW_LINE->* TO <L_LINE>.
DO 2 TIMES.
ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <L_LINE> TO <L_FIELD>.
<L_FIELD> = SY-INDEX.
ASSIGN COMPONENT 'NAME1' OF STRUCTURE <L_LINE> TO <L_FIELD>.
<L_FIELD> = 'A'.
INSERT <L_LINE> INTO TABLE <L_TABLE>.
ENDDO.
LOOP AT <L_TABLE> INTO <L_LINE>.
WRITE:/ <L_LINE>.
ENDLOOP.
READ TABLE <L_TABLE> INTO <L_LINE> INDEX 2.
<L_LINE>+10(2) = 'B'.
MODIFY <L_TABLE> FROM <L_LINE> INDEX 2.
LOOP AT <L_TABLE> INTO <L_LINE>.
WRITE:/ <L_LINE>.
ENDLOOP. -
How can find out LONG column database?
Hi,
in my database ORA-1461 error occured
01461, 00000, "can bind a LONG value only for insert into a LONG column
how can find out LONG column in my database ?DESCRIBE
The description for tables, views, types and synonyms contains the following information:
each column's name
whether or not null values are allowed (NULL or NOT NULL) for each column
datatype of columns, for example, CHAR, DATE, LONG, LONGRAW, NUMBER, RAW, ROWID, VARCHAR2 (VARCHAR), or XMLType
precision of columns (and scale, if any, for a numeric column)
Extract of the link;
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12019.htm#SQPUG040
Secondly with reference to the error;
Do not try to insert LONG datatypes into other types of columns.
Hope this helps.
Adith -
Hi,
In selection screen (parameter) user will give input TXT file from presentation server to upload to SAP. I need to capture the file name only but not the path and need to concatenate with date stamp and need to download error log in XLS file to presentation server.
How to find out the file name from selection screen?
I searched SCN threads but not found relavant solution.
Thanks,
R KumarHi
This code gets only filename from selection screen :
REPORT x.
PARAMETERS p_file(100).
DATA : gv_full_path LIKE ibipparms-path,
gv_full_path_string TYPE string,
gv_filename(100),
gv_file_ext(3).
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Ask user to select file with a popup :
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = gv_full_path.
Get filename from path :
gv_full_path_string = gv_full_path.
CALL FUNCTION 'CH_SPLIT_FILENAME'
EXPORTING
complete_filename = gv_full_path_string
IMPORTING
extension = gv_file_ext
name = gv_filename.
CONCATENATE gv_filename '.' gv_file_ext INTO gv_filename.
p_file = gv_filename.
I hope it helps. -
How to modify a table column name
Hi all,
How to modify a table column name...
Thankscould type the command here... but will not do that..because you are supposed to read the docs.
You can find the command here..
http://www.faqs.org/docs/ppbook/r22871.htm
Regards,
G. -
How to find out the table name
hi,
how to find out the table name in which the data from a particular structure in a particular screen is saved,
please tell me the procedure to find out the table name for saving the structure data that is inputted at runtime.
Thanks,
chinnuHi Chinnu,
Below are the tables that are referred to find out the table names
DD02L Table contains the SAP Tables.
DD02T Table contains the SAP Table Texts.
DD01L Table contains the Domains
DD01T Table contains the Domain Texts.
DD03L Table contains the Table Fields.
DD03T Table contains the Table Field Texts. (Language Dependent)
DD04L Table contains the Data Elements.
DD04T Table contains the Data Element Texts.
DD05s Table contains the Foreign Key Fields
last words with L and T only. L->Database Fetch T-> Text
And the procedure to retrive the table name is as follows
1. Go to se11
2. Enter table name DD03T and execute
3. In the next screen you can find Tables, fields, test etc. there you can enter the field name in the fields
and execute.
4. you can get all tables which contains the field.
I hope this will solve your problem
Regards,
Chandru -
Transaction IW32.How to find out the person name.(Last changed By)
Hi all,
When i executed the transaction IW32.Its displays changed by and created by fields. please any body can tell me how to find out the person name who had made last change with respect to the field changed by.
Please tell me the table and field name for the field last changed by......
Regards,
Munna.hi,
check the table AUFK field AENAM for the order number(AUFNR) in IW32.......... -
How to find PG.xml file name and path associated with a FUNCTION
Hi,
I am having a function:IRC_VIS_HOME_PAGE with Web HTML value as below:
OA.jsp?akRegionCode=IRC_VIS_HOME_PAGE&akRegionApplicationId=800&OAPB=IRC_BRAND
How to find PG.xml file name and path assoicated with above funtion.
Thanks,
ashokAshok,
Function IRC_VIS_HOME_PAGE will have 2 parameter defined for it which are OASF and OAHP where
OASF=<SelectedFunctionName> - this tells the Framework to select this function in the given "Home Page" menu context.
OAHP=<HomePageMenuName> - this is used ONLY with the OASF parameter, and it is used to establish the current menu context. It should point to a "Home Page" menu.
--Shiv -
How to find the Standard DFF Name In oracle apps
hi,
How to find the Standard DFF Name In oracle apps
thanks1. Open the form
2. Choose Tools--> Diagnostics
3. In the block field choose $DESCRIPTIVE_FLEXFIELD$
4. Field will show the list of all the DFF's enabled for that form.
5. Choosing one will display the name of the DFF in the value field.
Thanks
Nagamohan -
How to find primary constraint column
How can i get the column names of the primary keys if i know the CONSTRAINT_NAME, and CONSTRAINT_TYPE = "P" in the user constraints of the table name.
thanx in advance
utsabHi,
Have you tried using the table USER_CONS_COLUMNS ?
This has information about columns in constraint definitions.
Hope this helps.
Sujatha. -
How to find disk error.
How to find disk error, i tried iostat -En , /var/adm/messages,and prtdiag -v . is there anyother way to find the hardware error.
If theres nothing in /var/adm/messages and iostat -En isnt showing a problem.
What makes you think there is a disk error? -
How to know a table column name in HTML (Hyperion Interactive Reporting).
Hello,
I have a Hyperion Interactive Reporting dashboard section with an embembed table section on it.
The dashboard it will be open only in HTML.
I put the table as Active, so i can interact with her.
So, what I need to know now is how can I know the column name or number when I double click in one cell of the table.
Can anyone help me with this?
Thank you in advance,
CarlosViews don't have primary keys though their underlying tables might. You'd need to pick apart the view to determine where it's columns are coming from.
You can select the text of the view in question from user_views. -
How to find out the administrator name
How to find out my administrator name to unlock the parental control .
Look in the Apple Menu, in System Preferences, under the Users & Groups pane.
It should list all your users, by name. -
SSIS 2012 error column name - SSISDB
I need to get the column name for the error rows in a Data Flow Task. I have looked at this:
bennyaustin.wordpress.com/2011/02/04/ssis-name-of-errorcolumn/
which requires this: dfld.codeplex com
which requires "Fully qualified path of SSIS Package in File System.".
Our packages aren't deployed to the file system. They are deployed to the Integration Services Catalog/SSISDB.
What is the recommended method for retrieving the column name when a row is redirected due to an error?
Thanks for your help,
SuzanneHi Suzanne,
To get the column name based on the Lineage ID of the error column, we need to use the
FindColumnByLineageID method in a Script Component or create a Custom Component.
Now that the solution described in the blog you mentioned uses a third-party Custom Component, you can also refer to the following blog which provides the code to build such a Custom Component:
http://naseermuhammed.wordpress.com/tips-tricks/getting-error-column-name-in-ssis/
The demo in this blog is for SSIS 2012.
Regards,
Mike Yin
TechNet Community Support -
How to find flatfile errors while uploading data
hi all,
i hava a question... when i am uploading large amount of data (ex:1 lac records) in that 100 records are error records .. how to find the error records in flatfile before uploading.
regards shree.Hi,
The only way to find out errors is to open the file from abap read through each record and validate it.
However , my approach would be to read through each record, validate it, if valid process it otherwise collect it in another auxilary internal table and then in the end log the errors for later processing.
regards,
Advait
Maybe you are looking for
-
Satellite C855-2J4 - can't upgrade to Win 8.1 - error 0X1900101 0x30018
Hi, I am trying for days to upgrade my mam's laptop but I have no success... Tried everything, was following the Toshiba instructions: "How to Upgrade"... BUT i doesn't work.. i am always ending at the same error message... 0X1900101 0x30018 I almost
-
How to remove only the last element of spreadsheet string
I use path to string option to store image path into database and while retrieving the string is again converted into path but it gives out an error as the output of array to spreadsheet string gives out a tab at the end which is unable for the IMAQ
-
the device is no reaction from him. I've tried it with the dfu mode on my computer and others have charged it for more than 2hours, the computer does not recognize him. I've noticed that he no longer was he was burning hot.
-
Install OVM server 3.2.1 on iSCSI LUN
Hello friends, I have a Cisco Blade and would like to boot OVM server from an iSCSI lun. I create a LUN from a SAN and presented the lun to the blade. When the server boots up, it sees the iSCSI lun just fine but when I tried to install OVM server 3.
-
How can I read books on my iPad 1?
I have an old IPad 1 and can't find a book reader app that I can load, on this old operating system.