Error Message (ORA-01722: invalid number) when add amount into Number field

I am using VB.net, trying to insert data into a field called amt with Data Type 'Number'.
my vb.net code is as follows
Dim oradb As String = DatabaseConnectionString
Dim AmountValue As Decimal = 123.45
'get the connection
Dim conn As New OracleConnection(oradb)
'open the database connection
conn.Open()
'create oracle command
Dim cmd As New OracleCommand("INSERT INTO TBL1 (AMT) VALUES (:AMT)", conn)
cmd.CommandType = CommandType.Text
cmd.Parameters.Add(":AMT", OracleDbType.Decimal, AmountValue, ParameterDirection.Input)
'Execute
cmd.ExecuteNonQuery()
I got error message "ORA-01722: invalid number". Please help

Did you also change the below line before inserting Integer 123:
cmd.Parameters.Add(":AMT", OracleDbType.Decimal, AmountValue, ParameterDirection.Input)
to
cmd.Parameters.Add(":AMT", OracleDbType.Integer, AmountValue, ParameterDirection.Input)

Similar Messages

  • Error Message - ORA-01722 Invalid Number

    Hello:
    I have the following situation. When I create an organization, a record is inserted into the following table, AGREEMENTS, and populates four fields.
    I have an update form which selects the organization from the AGREEMENTS table so the user can populate the rest of the table. In addition, on this form, there is a drop-down box which allows the user to select the name of a legal document along with the version of the document in which the user needs to select. This select list is created via an LOV joining three tables. The item name for this select list is :P6_DOCUMENT.
    The code for the LOV is:
    SELECT S.DOC_NAME||' - '|| O.VERSION_NO AS DOC, O.ORG_DOC_CURR_KEY
    FROM SUPPORTING_DOCS S,
         ORG_DOC_CURR_VER O,
         AGREEMENTS H
    WHERE
        S.DOC_TYPE = 'HISA'
    AND S.SUPPORTING_DOC_KEY = O.SUPPORTING_DOC_KEY
    AND H.ORG_KEY_LE = O.ORG_KEY
    AND O.ORG_KEY=:P6_ORG_KEY_LEWhen the user completes the form, the SUBMIT process is a PL/SQL block consisting of an UPDATE statement to update the AGREEMENTS table based on the selected organization and an INSERT statement to insert a record into the AGREEMENTS_DOC table to store the value stored in :P7_DOCUMENT.
    Ok, now here is where my problem starts.
    When I first bring up the form and I select the organization I want to update, I click the Search button to find the organization and I receive the following error message: ORA-01722 Invalid Number.
    At this point all I'm doing is a basic search. There is no insert/update or anything going on. I'm not understanding why I would be receiving this error message.
    The search is based on the database column ORG_KEY_LE whose datatype is NUMBER.
    In my application, the item assigned to ORG_KEY_LE is P6_ORG_KEY_LE.
    I have a PL/SQL block process created (On Load-Before Header) in the Page Rendering area of my page definition. The PL/SQL code that is written is:
    BEGIN
    IF :P6_SEARCH_ORG != '0' THEN
    :P6_ORG_KEY_LE := :P6_SEARCH_ORG;
    END IF;
    END;I then have an Item created, :P6_SEARCH_ORG, which is a Select List. In the LOV portion of the page for this item, I have the following:
    select ORG_KEY_LE display_value, ORG_KEY_LE return_value
    from AGREEMENTS
    order by 1The reason for using this table is because this table contains the newly created organization which needs to be updated with the remaining columns of data.
    I then have a Search button in the Button area which has the following settings:
    Button Position: Region Template Position #CHANGE#.
    Condition Type: Value of Item in Express 1 is NULL.
    Expression 1: :P6_ORG_KEY_LE.
    To troubleshoot this problem, I created two pages, one page to do the UPDATE and the second page to do the INSERT.
    The SEARCH functionality in both pages are identical.
    When I run my UPDATE page, which only involves updating the missing fields, the process works. I have my search box, I'm able to search for the organization, make my updates, and I'm good.
    When I run my INSERT page, which involves inserting the record with the assigned document, I receive the error message after I click the SEARCH button. In order to INSERT the record into this table, I first need to SELECT the organization that was UPDATED in the AGREEMENTS table (using the UPDATE page described in above paragraph). When I select the organization, the user can then assign the appropriate legal document to the organization and insert the record into the AGREEMENTS_DOC table.
    Can someone help me with this error message? I'm not sure why I am able to perform my SEARCH on a page with the UPDATE statement, not able to perform the SEARCH on the page with my INSERT statement, and not be able to perform the SEARCH on the page that combines the UPDATE and INSERT statements.
    I did some more troubleshooting and I do believe my SUBMIT process which contains the INSERT statement is the issue. I created a fourth page which doesn't have a SUBMIT process. I brought up the form, searched for my organization and the information for that organization appeared. The problem is definately with my UPDATE/INSERT process.
    The PL/SQL block for the Submit process is the following:
    BEGIN
    update
        MDD.HISA_AGREEMENTS
         set
           LAST_UPDATED_BY=V('APP_USER'),
           APPROVER_SALUTATION=:P6_APPROVER_SALUTATION,
           APPROVER_FIRST_NAME=:P6_APPROVER_FIRST_NAME,
           APPROVER_MIDDLE_INITIAL=:P6_APPROVER_MIDDLE_INITIAL,
           APPROVER_LAST_NAME=:P6_APPROVER_LAST_NAME,
           APPROVER_NAME_SUFFIX=:P6_APPROVER_NAME_SUFFIX,
           APPROVER_EMAIL_ADDR=:P6_APPROVER_EMAIL_ADDR,
           SPONSOR_EMAIL_ADDR=:P6_SPONSOR_EMAIL_ADDR,
           APPROVER_TITLE=:P6_APPROVER_TITLE
    where
          ORG_KEY_LE=:P6_ORG_KEY_LE
    INSERT INTO
        HISA_AGREEMENT_DOCS
          (HISA_AGREEMENT_DOC_KEY,
           ORG_KEY_LE,
           APPLICATION_KEY,
           STATUS,
           STATUS_DATE,
           CREATED_BY,
           ORG_DOC_CURR_KEY)
    VALUES
          (HISA_AGREEMENT_DOC_KEY_SEQ.NEXTVAL,
           :P6_ORG_KEY_LE,
           :P6_APPLICATION_KEY,
           'C',
           SYSDATE,
           V('APP_USER'),
           :P6_DOCUMENT)
    END;There is something wrong with the above statement and I do not understand what it could be. Can someone help?
    Thanks for the help.

    Hi,
    I believe you are on to something.
    The select list for item :P6_DOCUMENT appears when I first bring up the form. When I select my organization and receive the error message, I clicked on the Session in the Developer's bar. The value in item/field :P6_DOCUMENT shows %null%.
    This is the path in which my user would like to accomplish her task:
    1. Select an organization
    2. Display the information for that organization from the AGREEMENTS table
    3. Enter the data for the remaining fields in the AGREEMENTS table
    4. Select the document (:P6_DOCUMENT) from the drop-down.
    5. Click Submit
    6. Update the AGREEMENTS table with data entered in #3.
    7. Insert a record into the AGREEMENTS_DOC table with the selection from #4.
    Somehow I need the :P6_DOCUMENT field not to show the %null% during the SEARCH functionality. I think that is causing the problem.
    How do I fix this?

  • Sdo_util error code ORA-01722: invalid number in Oracle 11g R2

    Dear every one,
    Greetings.
    Hi. As mentioned in the title, I met a strange problem when I was trying to extrude the 2D objects into 3D. The error code says ORA-01722: invalid number. Then, to eliminate the possibility that the code would be wrong, I took the sample code from the ORACLE document about sdo_util.extrude
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11830/sdo_util.htm#SPATL1230
    the same error appeared. However, I tested the same code through the SQLDeveloper in Linux (where the 11g R2 is located) to perform the same thing in my other database in windows server 2008 where 11g R1 was installed. Works fine.
    Is there any particular configuration I should do or I have done wrong. Any one knows, please help. Thanks.
    Jun

    Hi,-
    Please use w/o 'FALSE' parameter for 11.2.0.1.0 release:
    SELECT SDO_UTIL.EXTRUDE(
    SDO_GEOMETRY(
    2003,
    null,
    null,
    SDO_ELEM_INFO_ARRAY(1,1003,1),
    SDO_ORDINATE_ARRAY(5, 1,8,1,8,6,5,7,5,1)),
    SDO_NUMBER_ARRAY(0,0,0,0,0),
    SDO_NUMBER_ARRAY(5,10,10,5,5),
    0.005) from dual;
    In 11.1.0.7 release, you need to use 'FALSE' parameter:
    SELECT SDO_UTIL.EXTRUDE(
    SDO_GEOMETRY(
    2003,
    null,
    null,
    SDO_ELEM_INFO_ARRAY(1,1003,1),
    SDO_ORDINATE_ARRAY(5, 1,8,1,8,6,5,7,5,1)),
    SDO_NUMBER_ARRAY(0,0,0,0,0),
    SDO_NUMBER_ARRAY(5,10,10,5,5),
    'FALSE',
    0.005) from dual;
    We fixed this confusion for the next releases so that both interfaces can be used
    and 'FALSE' parameter will be ignored.
    Best regards
    baris

  • Getting error as ORA-01722: invalid number

    Hi below is my query
    select count(1) from table1 where table1.rqstid = '83041' AND table1..score_name = 'Small Business Credit Risk Score' AND
    to_number(table1.total_score) >= '70' and rownum<2
    I tried to convert '70' to 70, but still I got ame error.
    In table1 total_score is varchar2(30) data type, but for this rqstid the data is 420, so it should convert 420 to number and compare with 70.
    But why I am getting this error? Please help.
    If I remove to_number conversion fot total score then this error is not coming, but this will not give correct result for me.
    Thanks.

    CREATE TABLE SBE_SCORE (
    RQSTID VARCHAR2 (30) NOT NULL,
    SCORE_NAME VARCHAR2 (300),
    TOTAL_SCORE VARCHAR2 (30),
    RISKLEVEL VARCHAR2 (30),
    SUBSCRIBER_ID NUMBER (10))
    INSERT INTO SBE_SCORE ( RQSTID, SCORE_NAME, TOTAL_SCORE, RISKLEVEL,
    SUBSCRIBER_ID ) VALUES (
    '83041', 'Small Business Credit Risk Score for Financial Services', '420', NULL, NULL);
    My Query was
    SELECT
    count(1)
    FROM
    sbe_score
    WHERE
    sbe_score.rqstid = '83041' AND
    sbe_score.score_name = 'Small Business Credit Risk Score for Financial Services' AND
    to_number(sbe_score.total_score) >= '70' and
    rownum<2
    Error:ORA:01722 Invalid Number
    Now I have modified as below and I am able to get correct results
    SELECT
    count(1)
    FROM
    sbe_score
    WHERE
    sbe_score.rqstid = '83041' AND
    sbe_score.score_name = 'Small Business Credit Risk Score for Financial Services' AND
    to_number(translate(lower(sbe_score.total_score),'abcdefghijklmnopqrstuvwxyz@._','0'))>= 70 and
    rownum<2
    I I omit r in the translate function then I am getting same error Invalid number, So just I want to know whether the data 420 for total_score is taking "r" internally? withou our knowledge?

  • Designer 4.1.1 error message ora-01722 at 'open down '

    Message
    ORA-01722: YA
    Message
    RME-02124: Failed to execute SQL statement:
    select obj.id, obj.ivid, obj.name, obj.element_type_name , obj.diagram_type
    from CI_DIAGRAMS obj, ci_folder_members fm, ci_container_elements cel
    where fm.member_object = obj.id and cel.ivid = fm.parent_ivid and cel.id = :containerID and OBJ.DIAGRAM_TYPE in ( 'BPA')
    and OBJ.SUB_DIAGRAM_ID = 1974593597164206331699600463368029410order by 2

    Hi,
    I believe you are on to something.
    The select list for item :P6_DOCUMENT appears when I first bring up the form. When I select my organization and receive the error message, I clicked on the Session in the Developer's bar. The value in item/field :P6_DOCUMENT shows %null%.
    This is the path in which my user would like to accomplish her task:
    1. Select an organization
    2. Display the information for that organization from the AGREEMENTS table
    3. Enter the data for the remaining fields in the AGREEMENTS table
    4. Select the document (:P6_DOCUMENT) from the drop-down.
    5. Click Submit
    6. Update the AGREEMENTS table with data entered in #3.
    7. Insert a record into the AGREEMENTS_DOC table with the selection from #4.
    Somehow I need the :P6_DOCUMENT field not to show the %null% during the SEARCH functionality. I think that is causing the problem.
    How do I fix this?

  • Getting an Error Message on PS Elements 13 when entering correct serial number. How do I get Adobe to help me? I have sent emails and tried to chat over the past month, with no response.

    I purchased Photoshop Elements and registered it on November 1, 2014 with a Windows 7 machine. A couple weeks later, I decided to jump to a Mac, and have tried to enter the serial number for PS Elements 13 on the Mac. I get an error message that it is an incorrect serial number. It is the same serial number used with the Win 7 machine, and the same that shows on my Adobe.com profile. I thought I had to transfer the license from Win to Mac, so I emailed asking for help. No response. A couple weeks ago, I tried the Chat function. It was assigned a number, but Chat was unavailable and no one responded. Just tried Chat again, which says it is available 24/7, and it is unavailable. What can I do short of buying a new license, which I will not do.

    contact adobe support by clicking 'still need help' as soon as available, https://helpx.adobe.com/contact.html

  • 'ORA-01722: Invalid number' error message in BeX

    Hi Gurus,
    We have a new report built on top of a DSO. When I run this report, I get the message  'ORA-01722: invalid number'. On furthur testing, I found that when I move two objects 'Date Changed' & 'Time Changed' [both are 'Z' objects we created] from the 'Rows' to 'Free Characteristics', the report runs as expected. So the issue seems that it is with these two objects. One of them is of type 'DATS' & the other of type 'TIMS'. These two are mapped to respective 'Date' & 'Time' fields in SAP R3.
    SID's exists in the Master Data tables for both these objects. The data for both the fields contains the normal 'Date' & 'Time' values.Running the query using RSRT shows the same error message. The RSRV check on this report says that 'Query execution not possible as the variables contain invalid values'.
    I have seen a couple of other posts in SDN with similar issues but none of them have a solution identified so far. Just wanted to check if anyone who has experienced this issue have been successfully able to resolve it?
    Thanks
    Arvind

    Hi Ravi,
    Thanks for your prompt reply. Yes, the 'Date' & 'Time' objects have 0DATE & 0TIME as reference objects.
    I couldn't find any invalid vallues for these date and time fields. If invalid values were present, wouldn't the DSO activation have failed?
    Thanks
    Arvind.

  • Plz help ...Error on data insert ORA-01722 :invalid number

    Hi everybody
    I have the strange situation
    I tested my code on test database It works well
    but when another user want insert new data on the same table on the working database Oracle give message ORA-01722 :invalid number
    and then I look to table's structure
    On the table my data type that i want insert and table type is same
    Plz help ...

    sriram wrote:
    Based on your Input I can give you
    ORA-01722:     invalid number
    Cause:     The attempted conversion of a character string to a number failed because the character string was not a valid numeric literal. Only numeric fields or character fields containing numeric data may be used in arithmetic functions or expressions. Only numeric fields may be added to or subtracted from dates.
    Action:     Check the character strings in the function or expression. Check that they contain only numbers, a sign, a decimal point, and the character "E" or "e" and retry the operationI checked input value and table column type are same Because of i can't understand this error message

  • 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

  • Error ORA-01722: invalid number

    Hi,
    I am using Apex 3.2 on Oracle 11g (Enterprise Edition).
    I am new to Apex and I am using an imported application and editing its features to match my requirements.
    While uploading a CSV file, I am getting error as :ORA-01722: invalid number"
    Can someone help me where I am wrong or where I need to modify something?
    Thanks in advance.
    Regards
    Sharath

    Hi Littlefoot,
    Another set of information which I felt could be useful.
    In "Home>Application Builder>Application 1000>Page 71>Edit Page Process", under the tab 'Source', I could see the below code. I think I need to make changes here. Please correct me if I am wrong here.
    I need your help to modify this code (as this is an imported application, this code might be written keeping in mind the previous application).
    --PLSQL code for uploading server details
    DECLARE
    v_blob_data      BLOB;
    v_blob_len      NUMBER;
    v_position      NUMBER;
    v_raw_chunk      RAW(10000);
    v_char           CHAR(1);
    c_chunk_len           NUMBER:= 1;
    v_line           VARCHAR2 (32767):= NULL;
    v_data_array      wwv_flow_global.vc_arr2;
    v_rows           NUMBER;
    v_count           NUMBER;
    --for editing
    v_sr_no          NUMBER:=1;
    v_last_char          varchar2(2);
    BEGIN
    -- Read data from wwv_flow_files
    SELECT blob_content INTO v_blob_data FROM wwv_flow_files
    WHERE last_updated = (SELECT MAX(last_updated) FROM wwv_flow_files WHERE UPDATED_BY = :APP_USER)
    AND id = (SELECT MAX(id) FROM wwv_flow_files WHERE updated_by = :APP_USER);
    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    -- For removing the first line
    WHILE ( v_position <= v_blob_len )
    LOOP
    v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved
    IF v_char = CHR(10) THEN
    EXIT;
    END IF;
    END LOOP;
    -- Read and convert binary to char
    WHILE ( v_position <= v_blob_len )
    LOOP
    v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved
    IF v_char = CHR(10) THEN
    --removing the new line character added in the end of each line
    v_line := substr(v_line, 1, length(v_line)-2);
    --removing the double quotes
    v_line := REPLACE (v_line, '"', '');
    --For checking the absense of data in the end of line
    v_last_char:= substr(v_line,length(v_line),1);
    IF v_last_char = CHR(44) THEN
         v_line :=v_line||'-';
    END IF;
    -- Convert each column separated by , into array of data
    v_data_array := wwv_flow_utilities.string_to_table (v_line, ',');
    -- Insert data into target tables
    --Checking whether the data already exist
    SELECT COUNT(SERVERID) INTO v_count FROM REPOS_SERVERS WHERE SERVERNAME=v_data_array(1);
    IF v_count = 0 THEN
    EXECUTE IMMEDIATE 'INSERT INTO
    REPOS_SERVERS (SERVERID,SERVERNAME,IPADDRESS,OS,SERVER_MODEL,CPU,MEMORY,PLATFORM_TYPE, MACHINE_TYPE,CLUSTERED,LAST_UPDATE_BY,LAST_UPDATE_DATE,REMARKS) VALUES(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13)'
    USING
    SERVERS_SEQ.NEXTVAL,
    v_data_array(1),
    v_data_array(2),
    v_data_array(3),
    v_data_array(4),
    to_char(NVL(v_data_array(5),NULL)),
    v_data_array(6),
    v_data_array(7),
    v_data_array(8),
    v_data_array(9),
    v_data_array(10),
    v_data_array(11),
    v_data_array(12);
    END IF;
    -- Clearing out the previous line
    v_line := NULL;
    END IF;
    END LOOP;
    END;
    Regards
    Sharath

  • ORA-01722: invalid number

    Hi,[email protected]
    we are working on Import tool, which takes a CSV file and inserts in Oracle
    DB.I am using PLSQL UTL_File.Please look into the PLSQL file and clarify my
    Queries.
    If the Last column is a Varchar field, we are able to insert Records
    comfortably. but we get the Following Error when the last column in CSV file
    is a Number field.
    Error Generated:
    ORA-01722: invalid number 12242, ,
    Praveen, Reddy, Chitti, Praveen Reddy Chitti, ,700,
    ORA-01722: invalid number 12242, ,
    Abhishek, C, Singh, Abhishek C Singh, ,700,
    ORA-01722: invalid number 12243, , Paul,
    K, Jak, Paul K Jak, ,700,
    15 ORA-01722: invalid number 12242, ,
    Praveen, Reddy, Chitti, Praveen Reddy Chitti, ,700,
    Expecting reply from u in this regard.
    Regards,
    Mahi
    Sample table Structure:
    CREATE TABLE EMPM(
    CMPCD NUMBER (10) NOT NULL,
    LCTCD NUMBER (10),
    EMPCD NUMBER (10) NOT NULL,
    REFNO VARCHAR2 (51),
    USRID NUMBER (10),
    PREFX VARCHAR2 (10),
    FNAME VARCHAR2 (51) NOT NULL,
    MNAME VARCHAR2 (51),
    LNAME VARCHAR2 (51) NOT NULL,
    FULNM VARCHAR2 (201) NOT NULL,
    EMPSX VARCHAR2 (1),
    SSNUM VARCHAR2 (16),
    NTLTY NUMBER (10),
    STSCD NUMBER (10),
    TCODE NUMBER (10),
    JDATE DATE,
    TDATE DATE,
    ACDOB DATE,
    ADATE DATE,
    DSGCD NUMBER (10),
    DPTCD NUMBER (10),
    MGRCD NUMBER (10),
    REFBY NUMBER (10),
    WPHON VARCHAR2 (25),
    MPHON VARCHAR2 (16),
    RPHON VARCHAR2 (16),
    PGRNO VARCHAR2 (16),
    WKFAX VARCHAR2 (16),
    RSFAX VARCHAR2 (16),
    WKEML VARCHAR2 (256),
    PEML1 VARCHAR2 (256),
    PRLN1 VARCHAR2 (256),
    PRLN2 VARCHAR2 (256),
    PRCCD VARCHAR2 (256),
    PRSCD NUMBER (10),
    PRSIN VARCHAR2 (51),
    PRCTR NUMBER (10),
    PRZIP VARCHAR2 (15),
    PMLN1 VARCHAR2 (256),
    PMLN2 VARCHAR2 (256),
    PMCCD VARCHAR2 (256),
    PMSCD NUMBER (10),
    PMSIN VARCHAR2 (51),
    PMCTR NUMBER (10),
    PMZIP VARCHAR2 (15),
    LOADN NUMBER (10),
    RESF1 VARCHAR2 (256),
    RESF2 VARCHAR2 (256),
    RESF3 VARCHAR2 (256),
    RESF4 VARCHAR2 (256),
    RESF5 VARCHAR2 (256),
    OWNER VARCHAR2 (4000),
    NOTES VARCHAR2 (401),
    DFLAG VARCHAR2 (10) DEFAULT '0' NOT NULL,
    MODBY NUMBER (10) NOT NULL,
    MODON DATE NOT NULL,
    PRIMARY KEY("CMPCD", "EMPCD"))

    we get the Following Error when the last column in CSV fileis a Number field.
    Clearly one or more records has a value in the last column that is non-numeric. Broadly speaking, a number consists of characters 0123456789, with optional minus sign and decimal point (scientific notation is also allowed). Just about anything else is not a number. 934-89 is not a number. 786.567.765 is not a number. A NULL should not throw ORA-1722 but spaces will.
    So, check your data. You find it necessary to employ an intermediary table and cleanse the data there. Alternatively, yell at the people who produce the extract. Or change your schema definition. Whatever's right.
    Cheers, APC

  • ORA-01722: invalid number while using TO_CHAR function.

    Hi All,
    I was using this query from around past 1 year and everything was working fine.
    select to_char ( '2012/12/23','YYYY/MM/DD') from dual;
    how ever from monday onwards , this is returning me with the following error.
    ORA-01722: invalid number
    The NLS_DATE_FORMAT is DD-MON-RR in my oracle 11g version.
    Please help me regarding this.

    Your date is in literal & your intended format so no need to format it again.
    select to_char ( '2012/12/23','YYYY/MM/DD') from dual;
    same as
    select '2012/12/23' from dual;I don't know your need so same code to work!!!
    select to_char(to_date('2012/12/23','YYYY/MM/DD'),'DD/MM/YYYY') from dualsunnymoon wrote:
    where vale for ? is coming as '2011/12/23' from java.
    the whole application has to be changed and retested.
    >
    It it comes as a text convert it to date TO_DATE('2011/12/23','YYYY/MM/DD') to use in comparison operators like =, != , > , < etc. Comparison operators used taking date as literal will give you wrong result.
    Better to do it right even it takes huge effort.
    Edited by: Lokanath Giri on ३ जनवरी, २०१२ १२:०६ अपराह्न

  • Handle null value in char infoobject -data type DATE(ora-01722 invalid num)

    Hi,
    We have a DSO with a info object in the Data fields. The char info object has the data type DATE and most often it has the null value. but some times  it has data in it.
    When ever we were trying to run a report on the DSO it throws a error  as  ORA- 01722 INVALID NUMBER.
    we tried editing PSA data and placing 00000000 for null values - and had a message  invalid date.
    suggestions pls
    Regards.

    Hello,
    Please check the note given below
    https://service.sap.com/sap/support/notes/1327167.
    If null value is the problem,  change the query setting for not to show the null values. Just add a filter in ZDAT to exclude "NULL"
    Thanks
    Nidhi

  • ORA-01722: invalid number error when trying to pass a list of values

    Gurus
    We are using a function like so
    The usage for the function below is
    Select fn_st_bb_nm_uc (‘1232131312, 123213312’) from dual;
    SQL> /
    Select fn_st_bb_nm_uc ('1232131312, 123213312') from dual
    ERROR at line 1:
    ORA-01722: invalid number
    It’s giving an invalid number error. When we pass one value it is working fine but when we pass a string of values it gives this error. I have opened an SR around this but would greatly appreciate your help
    Acc_blackbar is the table and acc_blkbr_id is of type number.
    FUNCTION fn_st_bb_nm_uc (pBB_ID_LIST VARCHAR2)
    RETURN VARCHAR2 IS
    vspcm_typ_nm_uc VARCHAR2 (2000);
    CURSOR stname
    IS
    SELECT distinct st.spcm_typ_nm_uc
    FROM
    acc_blackbar abb,
    acc_specimen_type ast, acc_procedure apr,
    acc_specimen_part asp,
    specimen_type st, procedure pr,
    proc_proc_family ppf
    WHERE abb.ACC_BLKBR_ID = apr.ACC_BLKBR_ID
    AND apr.ACC_SPCM_PART_ID = asp.ACC_SPCM_PART_ID
    AND asp.ACC_SPCM_TYP_ID = ast.ACC_SPCM_TYP_ID
    AND ast.ACC_SPCM_TYP_SPCM_TYP_ID = st.SPCM_TYP_ID
    AND apr.procdr_id = pr.PROCDR_ID
    AND pr.PROCDR_ID = ppf.PROCDR_ID
    AND abb.acc_blkbr_id in (pBB_ID_LIST) ;
    BEGIN
    DBMS_OUTPUT.PUT_LINE(' BB LIST : ' || pBB_ID_LIST);
    FOR st IN stname
    LOOP
    vspcm_typ_nm_uc := vspcm_typ_nm_uc || ',' || st.spcm_typ_nm_uc;
    END LOOP;
    vspcm_typ_nm_uc := SUBSTR (vspcm_typ_nm_uc, 2);
    RETURN vspcm_typ_nm_uc;
    END;

    This ask tom thread covers multiple solutions:
    [http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:210612357425|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:210612357425]

  • User Accounts and ORA-01722: invalid number error

    Hello,
    I have been using Express for a month or so now but have very limited knowledge of how it works.
    My Problem:
    I have a listing screen for user records which creates records in table QAS_USERS.
    When I add a record it saves the data OK and put the record in the list.
    When I click on the record in the list it takes me to the edit screen and I can change
    the details and it works OK and all the changes get saved to the database.
    On the data entry screen I have a list of the User Groups so I can select what group
    the user will be in, usual details in username, fullname, email address, password etc..
    I then added a routine to create a USER in the APEX Manage USERs.
    It creates the record in my table QAS_USERS and it creates a APEX User Account with
    the correct details and the record is displayed in the list.
    So far so good.
    Now the errors start:
    1. When I look at the User Account in Administration -> Manage Application Express Users
    most of the details have been added but the User Group does not get allocated.
    2. The record I created in QAS_USERS appears in the list on my listing screen but when
    I click on the Edit Icon on the left of the list I get the following error appear
    when the screen changes to the edit screen:
    ORA-01722: invalid number
    Unable to fetch row error
    QAS_USER Table:
    ID NUMBER
    CREATED_ON DATE
    CREATED_BY VARCHAR2(10)
    CHANGED_ON DATE
    CHANGED_BY VARCHAR2(10)
    ACTIVE VARCHAR2(3)
    USERNAME VARCHAR2(10)
    FULLNAME VARCHAR2(30)
    TEAMLEADER VARCHAR2(3)
    TEAMLEADER_ID NUMBER
    LAB NUMBER
    DIRECTOR VARCHAR2(3)
    ACTION_MANAGER VARCHAR2(3)
    SDM VARCHAR2(3)
    GM VARCHAR2(3)
    EMAIL_ADDRESS VARCHAR2(50)
    PASSWORD VARCHAR2(12)
    SDTL VARCHAR2(3)
    FIRSTNAME VARCHAR2(30)
    LASTNAME VARCHAR2(30)
    GROUP_ID NUMBER
    USER_ID VARCHAR2(20)
    Process Script to create the Express User Account:
    Declare
    group_id NUMBER;
    BEGIN
    group_id := APEX_UTIL.get_group_id (:P15_GROUP_ID);
    APEX_UTIL.CREATE_USER (
    P_USER_NAME => :P15_USERNAME,
    P_FIRST_NAME => :P15_FIRSTNAME,
    P_LAST_NAME => :P15_LASTNAME,
    P_WEB_PASSWORD => :P15_PASSWORD,
    P_EMAIL_ADDRESS => :P15_EMAIL_ADDRESS,
    p_developer_privs => 'ADMIN',
    p_group_ids => group_id);
    END;
    If any one has any ideas I would be very grateful.
    Regards,
    Simon.

    Hi,
    It could be that this is because you are using SYSDATE which contains the time as a fraction rather than TRUNC(SYSDATE) which just contains the current time. It could be that your working_dates_between raises this error.
    However, your formula is far more complicated than it needs to be.
    Firstly, you want to look at the date window ADD_MONTHS(TRUNC(SYSDATE), -6) to TRUNC(SYSDATE). Then you want to look at the portion of the absence that falls in the date window. This is GREATEST(Absence Attendance.Actual Start Date, ADD_MONTHS(TRUNC(SYSDATE), -6)) to LEAST(NVL(Absence Attendance."Actual End Date",TRUNC(SYSDATE)), TRUNC(SYSDATE)). You may need to add 1 to the absence end date because this is the last day of their absence rather than the date they return. It depends how you calculate the days between the start and end
    date of the absence. You can create calculations for the start and end date of the absences within the 6 months time window. Create calculation AbsenceStart as
    GREATEST(Absence Attendance.Actual Start Date, ADD_MONTHS(TRUNC(SYSDATE), -6))
    and AbsenceEnd as
    LEAST(NVL(Absence Attendance."Actual End Date",TRUNC(SYSDATE)), TRUNC(SYSDATE))
    Then you need to only pick up absence that a part of the absence in your 6 month date window. You can use a condition in the workbook or a condition in a case statement to do this. You then need to calculate the difference between these dates and SUM all the values.
    SUM(CASE WHEN AbsenceEnd >= AbsenceStart THEN WORKING_DAYS_BETWEEN(AbsenceStart, AbsenceEnd) END)
    That's it. Not so complicated after all.
    Rod West

Maybe you are looking for

  • Error opening the database for the library | [name].aplibrary | Aperture 3.1.2

    I've read and followed through the archived threads relating to this problem but I could not resolve this. Can anyone help please. Software: Aperture 3.1.2 Issue: Error message when attempting to launch an Aperture Library file: Location of database:

  • Airport express Connection Problem

    The airport worked fine at my home but i brought it to college and the airport says its connected but i get no signal. How do i fix the internet through the airport? My normal ethernet connection is working, just not the airport

  • Transaction line item

    Hi, How transaction line items be maintained under sub asset. We want to maintain a hierarchy in assets as follows: Account determination-Asset Class-Group asset-Main asset-Sub asset-Transaction line item. It will help us in reporting. Please suggest

  • Information about Oracle Utilities CCB SDK

    Hi, Colud you please help me about Oracle utilities(CC&B) Software Development Kit (SDK). 1.Information of Oracle CC&B SDK ? 2.Verision of the Oracle CC&B SDK? 3.Size of the Oracle CC&B SDK? 4.Where can i downlaod the Oracle CC&B SDK & schema editor?

  • Run XP / Vista from a USB flash memory on my Macbook Air

    Hello! Does anyone know if it is possible to boot and run XP directly from a USB stick? I am fairly new to Mac. So far I like it a lot however, due to my job I need to run some things in XP or Vista. Instead of "polluting" my new Macbook Air with a p