Find the Column Name which gives Invalid Number Error

Hi,
There are about 150 columns in a table and data to this table is from a external source like flat file. when these data are loaded to the table for a particular column it gives Invalid Number Error. So need to find for Which Numeric Column a String Value is about to be inserted.
since we are sure not whether the proper Values are coming from Source in Front End we pass the Value within ' quotes.
So how do we get the Column for which the error is raised :-)

If you are using SQL*Loader, the log will tell you which row and column has the error.
Otherwise you may need to code your own debugging statements.

Similar Messages

  • How to find the column name and table name with a value

    Hi All
    How to find the column name and table name with "Value".
    For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
    Any help is highly appricatable
    Thanks & Regards
    Srikkanth.M

    2 solutions by Michaels (the latter is 11g upwards only)...
    michaels>  var val varchar2(5)
    michaels>  exec :val := 'as'
    PL/SQL procedure successfully completed.
    michaels>  select distinct substr (:val, 1, 11) "Searchword",
                    substr (table_name, 1, 14) "Table",
                    substr (t.column_value.getstringval (), 1, 50) "Column/Value"
               from cols,
                    table
                       (xmlsequence
                           (dbms_xmlgen.getxmltype ('select ' || column_name
                                                    || ' from ' || table_name
                                                    || ' where upper('
                                                    || column_name
                                                    || ') like upper(''%' || :val
                                                    || '%'')'
                                                   ).extract ('ROWSET/ROW/*')
                       ) t
    --        where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
           order by "Table"or
    SQL> select table_name,
           column_name,
           :search_string search_string,
           result
      from cols,
           xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
           columns result varchar2(10) path '.'
    where table_name in ('EMP', 'DEPT')
    TABLE_NAME           COLUMN_NAME          SEARCH_STRING        RESULT   
    DEPT                 DNAME                ES                   RESEARCH 
    DEPT                 DNAME                ES                   SALES    
    EMP                  ENAME                ES                   JONES    
    EMP                  ENAME                ES                   JAMES    
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   PRESIDENT
    EMP                  JOB                  ES                   SALESMAN 
    9 rows selected.

  • Find the column name for a constraint

    Hi Guru,
    I know the constraint name, now i need the column name and table name for the constraint?
    Thanks

    Query the USER_CONS_COLUMNS  then you will find the column name and table Name
    SQL> Select  *  from  USER_CONS_COLUMNS  where Constraint_Name='<Your_constraint_Name>';

  • Organization name - How do I find the organization name which SCSM was registered under?

    Organization name - How do I find the organization name which SCSM was registered under?
    By the way I didnt install SCSM, I am new to this, I just got here and the previous admin didn't have or gave any documentation.
    Thanks

    You can view the values in the registry. Open regedit and go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\System Center\2010\Service Manager\Registration
    Cheers,
    Thomas Strömberg
    System Center Specialist
    Blog:  
    Twitter:   LinkedIn:
    Please remember to 'Propose as answer' if you find a reply helpful

  • How to know the Column name which contains some value?

    Suppose if a table contains 30 columns, and I want to know the name of the Column that contains my search text(Value).
    For Eg. I have a Table named Allowances contains 20 columns for referencing 20 types of allowances. The columns are named like Allw_1,Allw_2,...etc..I know the allowance name(Like "Incentive") and I want to know the Column name on which this allowance name presents.
    Pls. help me.

    Change your DB model.
    A Table with columns called allw_1, allw_2, ... begs to be normalized.

  • How to determine offending column in ORA-01722: invalid number error ...

    When an error like
    ORA-01722: invalid number error
    occurs and you are dealing with many columns that could be the 'culprit', does anyone have a method by which
    you can quickly determine offending column?

    SQL PLus will tell you:
    SQL> create table t
      2  (col1  number
      3  ,col2  number
      4  ,col3  number
      5  ,col4  number
      6  ,col5  number
      7  );
    Table created.
    SQL> create table x
      2  (col1  varchar2(10)
      3  ,col2  varchar2(10)
      4  ,col3  varchar2(10)
      5  ,col4  varchar2(10)
      6  ,col5  varchar2(10)
      7  );
    Table created.
    SQL> insert into x values ('1','2','x','4','5');
    1 row created.
    SQL> insert into t(col1,col2,col3,col4,col5)
      2  select col1,col2,col3,col4,col5 from x;
    select col1,col2,col3,col4,col5 from x
    ERROR at line 2:
    ORA-01722: invalid numberAnd if you rearrange your sql like this, sql plus will give you the line number of the offending column:
    SQL> insert into t
      2  (col1
      3  ,col2
      4  ,col3
      5  ,col4
      6  ,col5
      7  )
      8  select col1
      9        ,col2
    10        ,col3
    11        ,col4
    12        ,col5
    13  from x;
          ,col3
    ERROR at line 10:
    ORA-01722: invalid number

  • Finding the column names from a table.

    I am on 10g
    I would like to find out the columns of a table where there are null columns in a table.....this table contains about 300 + columns where i do not want to put where condition for all the columns
    is there a way i can write a sql to find?
    for a given table or the results set that i need to get, i will have same results for all the rows, so it
    cant be like col1 is null on row1, but col2 is not null on row2 ...they are all identical....
    example table, but it has 300 + cols
    F_IND     H_IND     P_IND     DMA_IND
    N     N          
    N     N          
    N     N          
    N     N          Thanks

    select count(col1), count(col2), count(col3), ...
    from your table;
    The results with 0s are null throughout the table (or the table has no rows).

  • Query to find the class name that has the maximum number of students ?

    I need the query to find the [class Name] which has the most number of students. please look below at the tables
    Students Table                                                                     
    StudentId     StudentName  ClassID                                    
    1                  xxx                   1                                           
    2                  yyy                   1                                           
    3                  zzz                   1  
    4                  fff                    2
    5                   ttt                  2
     Classes Table
     ClassID          ClassNane
     1                    CSHARP
     2                    JSHARP
    The result should be : CSHARP
    since there are 3 students in CSHARP and 2 students in JSHARP class
    Appreciate your help
    Thanks

    Try:
    DECLARE @Classes TABLE (
    ClassID INT identity(1, 1) PRIMARY KEY
    ,ClassName VARCHAR(50)
    INSERT INTO @Classes (ClassName)
    VALUES ('CSharp')
    ,('JSharp')
    DECLARE @Students TABLE (
    StudentID INT identity(1, 1) PRIMARY KEY
    ,StudentName VARCHAR(10)
    ,ClassID INT
    INSERT INTO @Students (
    StudentName
    ,ClassID
    VALUES (
    'xxx'
    ,1
    'yyy'
    ,1
    'zzz'
    ,1
    'fff'
    ,2
    'ttt'
    ,2
    SELECT TOP (1)
    WITH TIES C.ClassName
    FROM @Classes C
    INNER JOIN @Students S ON C.ClassID = S.ClassID
    GROUP BY C.ClassID
    ,C.ClassName
    ORDER BY COUNT(S.StudentID) DESC
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Find the program name

    hi,
    I have to find the program name which can let me know a field which exists in different custom program...
    Can anyone guide me please. Its bit urgent
    ~~Guduri

    Hi ,
    run the program RSSCAN1 or RPR_ABAP_SOURCE_SCAN .. give the program name as z* and in the search string give the name of the field that you are looking for.
    Thanks
    Mahesh

  • How to change the column names in display

    Hi,
    I want to change the columns names and give the display names as more User friendly..
    How should I acheive this in WebI reports.
    Regards,
    BOB

    Hi,
    the columns names are normal text fields. Just selecdt to edit your report , go to the editor panel and select the column header you want to modify. You can enter the text you want to display
    Regards,
    Stratos

  • How to get the column name and table name with value

    Hi All
    I have one difficult requirement
    I have some column values and they have given some alias column names but i need to find the correct column name and table name from the database.
    For example value is "SRI" and i dont know the table and exact column name so is there any possibilities to find the column name and table name for the given value
    Thanks & Regards
    Srikkanth.M

    Searching all the database for a word...
    Courtesy of michaels...
    michaels>  var val varchar2(5)
    michaels>  exec :val := 'as'
    PL/SQL procedure successfully completed.
    michaels>  select distinct substr (:val, 1, 11) "Searchword",
                    substr (table_name, 1, 14) "Table",
                    substr (t.column_value.getstringval (), 1, 50) "Column/Value"
               from cols,
                    table
                       (xmlsequence
                           (dbms_xmlgen.getxmltype ('select ' || column_name
                                                    || ' from ' || table_name
                                                    || ' where upper('
                                                    || column_name
                                                    || ') like upper(''%' || :val
                                                    || '%'')'
                                                   ).extract ('ROWSET/ROW/*')
                       ) t
    --        where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
           order by "Table"or
    11g upwards
    SQL> select table_name,
           column_name,
           :search_string search_string,
           result
      from (select column_name,
                   table_name,
                   'ora:view("' || table_name || '")/ROW/' || column_name || '[ora:contains(text(),"%' || :search_string || '%") > 0]' str
              from cols
             where table_name in ('EMP', 'DEPT')),
           xmltable (str columns result varchar2(10) path '.')
    TABLE_NAME                     COLUMN_NAME                    SEARCH_STRING                    RESULT   
    DEPT                           DNAME                          es                               RESEARCH 
    EMP                            ENAME                          es                               JAMES    
    EMP                            JOB                            es                               SALESMAN 
    EMP                            JOB                            es                               SALESMAN 
    4 rows selected.

  • How To Know The Column Name Of The Internal Table

    HI ,
            i have an internal table .
    f1          f2           f 3         f4            f5  
    matnr   mbrsh    mtart     meins       minbe
    i want to know the column name which depending on the value i.e . if it is matnr then f1 , if mbrsh it is f2 ..so on
    Thanks.

    Hi ,
          thanks for your replies . i am elaborating my query .
            I have an internal table with 80 fields i.e.f1,f2,f3......f80 . In the first index i will be having the fieldnames
    i.e.matnr , mbrsh , meins , mtart ..... . From second index onwards i will be having the corresponding data  for the field name.  i need to display a particular field in a table control . Here i will be knowing the fieldname. If i can get to know the column name i.e whether f1 or f2 or ... .i Can populate the data into the table control.
    Wht i have done is taken a field symbol  and used the following code.
    read table i_upload index 1  assigning <lv_upload>.
    here i will get the initial first record i.e
    F1                                             MATNR
    F2                                             MBRSH
    F3                                             MTART
    F4                                             WERKS
    F5                                             LGORT
    F6                                             VKORG
    F7                                             VTWEG
    F8                                             MAKTX
    F9                                             MEINS
    F10                                             MATKL
    F11                                             BISMT
    F12                                             BRGEW
    F13                                             GEWEI
    F14                                             NTGEW
    F15                                             GROES
    F16                                             KLART
    F17                                             CLASS
    F18                                             SPART
    F19                                             VRKME
    F20                                             UMREN
    now i want to the field name .
    Hope it is clear this time .
    Thanks.

  • Query the column names from Public database links

    Greetings,
    I would like to retrieve the list of all the column names from a public database link. A regular ALL_TAB_COLUMNS doesn't seem to be working.
    Thanks
    John9569

    Hi,
    I think your DBA needed to create a synonym for you to have access of that remote database view.
    CREATE SYNONYM synonym_name
    FOR view_name@db_link;Then you can find the column names by
    DESC   synonym_nameGuru's , please correct me If I am wrong.
    Thanks
    Edited by: user10679113 on Mar 12, 2009 12:28 PM
    Edited by: user10679113 on Mar 12, 2009 12:33 PM

  • How to find the API name from the Integrator

    I am looking in a WebADI build solution.
    1) I need to find the API name, which is used by the Custom integrator to validate and insert the data into custom table.
    Can we find the source where WebADI integrator stores the API name.
    Please help me out in this.

    Satya,
    You are right that we are not supposed to change the Oracle supplied files. But some times you really don't have any other option. Some times Oracle support them selves ask you to change their programs.
    Anyway the Concurrent program definition is stored in BNE_PARAM_LISTS_B, BNE_PARAM_LISTS_TL, BNE_PARAM_LIST_ITEMS and BNE_ATTRIBUTES table. For a concurrent program with out any parameter there will be 6 records in BNE_PARAM_LISTS_ITEMS and BNE_ATTRIBUTES table.
    These racords are
    Application, Program, Description, Run date , Sub Request , End of Concurrent Request Parameters and Rest of parameters default.
    Look at these tables and you will know how Oracle has defined these Concurrent programs.
    HTH
    Dinesh

  • How to find the rfc name

    hello,
    when a rfc is called in another system, there will be
    rfc name inside which will be connected to the called system.
    how can we find the rfc name which is connected to the called system ?
    Required immediately.
    Point rewarded.
    Prashanth

    Hi kumar,
    1. u r question is not clear to me.
    2. we can use 'BACK'
       (to connect to the calling system)
      (destination name is not required)
    regards,
    amit m.

Maybe you are looking for

  • How can I add a device to my library? My e-reader is registered but not visible.

    Hello, I use a Tolino Shine and can download E-Books via WLAN directly to it. I can also download the books to my netbook. However, when I plug the Tolino into my netbook it is not visible in the Adobe library and I cannot move books from the library

  • Rented movie not showing up in iTunes to watch on my laptop

    Am having trouble watching a rented movie, it is not past the 30 days. The movie is not in the video section in iTunes. Please help?!

  • My camera won't connect to iMovie

    When I click on 'import from camera'. it says that no camera is connected. But my camera is connected. I also checked to see, and my camera is compatible with iMovie. I feel like I have tried everything and I don't know what the problem is. I have re

  • Configuration problem in NWDS

    Hi all, I am trying to configure the SAP J2ee Engine in NWDS by entering the Message server port and host frm Windows- preferences-SAP J2ee Engine . Host: <servername> Port:<3601> but it doesnt show up the j2ee engine view below with the instances .

  • Trying to open an App_MIDIOVERLAN CP_crashes computer

    I have been trying to use a program on OS X on my second Mac (see specifications below) and cannot get it to work. It is a program called MolCp3 from MusicLab. It is used to network Macs and PCs together. I cannot get MolCp3 to work on my second Mac.