Invalid Number When Submitting XML Publisher Request Sets

Hi All,
I face this problem when I click on option of the second request on request set. I found this is a oracle bug on metalink. I post this question because I wanted to know if there are any workaround to solve this issue without applying the patch.
Appreciate your help.
Best Reagards,
Edwin

Hi Husein,
Just FYI,
I just found the bug is due to below query:
select concurrent_program_name
into :global.temp_prog_name
from fnd_concurrent_programs
where application_id = :set_requests.application_short_name
and concurrent_program_id = :set_requests.concurrent_program_id;
Some how the application_id is compared to application short name.
Actually i can do the workaround using form personalization to apply the application_short_name with application id ....but it is not recommended and advised!!.
Best Regards,
Edwin

Similar Messages

  • Submitting xml publisher not producing output file when submiting from Oracle Procedure

    When Running XML publisher program from Oracle Procedure, Program not generating output file, but same XML publisher program running from Concurrent program runs and produces the output file.
    Here is the code
    CREATE OR REPLACE PROCEDURE apps.wmmgd_sepa_formats (
       p_return_msg      OUT      VARCHAR2,
       p_return_code     OUT      NUMBER,
       p_payment_batch   IN       VARCHAR2                                    ---,
    --- p_bank_name          in varchar2
    IS
       name:      wmmgd_sepa_formats
       purpose: this procedureis to  create SEPA payment formats
       revisions:
       ver      date        author           description
       1.0     6/11/2013  V Gongireddy  Created the Procedure
       l_ret         BOOLEAN;
       l_req_id      NUMBER;
       v_org_id      NUMBER;
       v_cntr        NUMBER;
       v_file_name   fnd_concurrent_requests.outfile_name%TYPE;
       v_language    VARCHAR2 (20);
    BEGIN
       SELECT fnd_profile.VALUE ('ORG_ID')
         INTO v_org_id
         FROM DUAL;
       fnd_file.put_line (fnd_file.LOG, 'org id ' || v_org_id);
       fnd_file.put_line (fnd_file.output, 'Start org id ' || v_org_id);
       FOR i IN 1 .. 10000
       LOOP
          v_cntr := v_cntr + 1;
       END LOOP;
       l_ret :=
          fnd_request.add_layout ('SQLAP',
                                  ' WMMGDSEPAFORMATXSL',
                                  'en',
                                  'US',
                                  'XML'
       IF l_ret = TRUE
       THEN
          BEGIN
             fnd_file.put_line (fnd_file.output,
                                'Payment batch ' || p_payment_batch
             l_req_id :=
                fnd_request.submit_request ('SQLAP',
                                            'WMMGDSEPAFORMAT',
                                            FALSE,
                                            p_payment_batch
             v_cntr := 0;
             FOR i IN 1 .. 10000
             LOOP
                v_cntr := v_cntr + 1;
             END LOOP;
             p_return_msg := 'Request submitted. ID = ' || l_req_id;
             p_return_code := 0;
             COMMIT;
          EXCEPTION
             WHEN OTHERS
             THEN
                p_return_msg :=
                      'Payment Request set submission failed - unknown error: '
                   || SQLERRM;
                p_return_code := 2;
                fnd_file.put_line (fnd_file.LOG,
                                   'the_request_id ' || l_req_id || p_return_msg
          END;
       END IF;
    END wmmgd_sepa_formats;
    Thanks in advance

    And metalink note 1100253.1 states that this issue (java.lang.StackOverflowError) might be caused by a too large set of data to be sorted in the layout file. Recommendation is to removed the sort from the layout file and instead sort the data already in the data definition.
    regards,
    David.

  • Issue when submitting XML report from back end.

    Hi All,
    I have a customized XXPrinted Purchase Order Report where I am submitting it from back end as below.
    l_var := fnd_request.add_layout (template_appl_name =>'XX Custom',
    template_code =>'XX_PRINTED_PO',
    template_language =>'English',
    template_territory =>null,
    output_format =>'PDF');
    l_request_id :=fnd_request.submit_request
    (application => 'XX',
    program => 'XX_PRINTED_PO',
    When I am executing this block in PO approval workflow with the customized function XXPO_COMMUNICATION_PVT.fax_po
    It is submitting the report but output is showing in xml data (not in pdf)
    Please let me know if I am missing anything.
    Thanks in advance.

    Please post the details of the application release, database version and OS.
    Can you post the concurrent request log file here?
    Can you find any errors in the OPP log file ($APPLCSF/$APPLLOG/FNDOPP*)?
    How to Use FND_REQUEST.ADD_LAYOUT When Submitting a Concurrent Request Via a PL/SQL Procedure [ID 308658.1]
    Thanks,
    Hussein

  • ORA-10722 Invalid Number when trying to Associate Asset to Activity

    Hello experts,
    For Activities created by API, we are getting an error (ORA-10722 Invalid Number) when attempting to associate a asset to the activity using the activity Association Form. Has anyone run across this before?
    Thanks,
    Tom

    ORA-01722: invalid number
    It can be because of 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.
    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 operation .
    Check API design.
    Regards
    Kamal

  • Getting error 'Unable to Deliver XML Publisher Request'

    Hi, there is a workflow which will trigger a letter through XML publisher. Few types are letters are printing. For few letters, getting an error 'Unable to Deliver XML Publisher Request' as a mail.
    Any suggestions on this?
    Thanks in advance,

    Hi,
    What version of XML Publisher are you on?
    What is the EBS Release?
    Bursting Engine: Unable to Delivery Output to Both File System and Printer [ID 399412.1]
    Thanks

  • ORA-01722: invalid number when performing query

    Hi,
    I am running SQL Developer on a laptop (XP Pro) accessing Oracle Applications
    Product Version     11.5.10.2
    Platform     IBM SP AIX
    OS Version     AIX
    Database     9.2.0.7.0
    Support ID     14460365
    If I run the following query it works fine -
    select
    mtrh.request_number
    ,to_number(mtrh.request_number)
    from
    mtl_txn_request_headers mtrh
    where
    to_number(mtrh.request_number) = 135060
    and mtrh.request_number = '135060' -- works with this line in!!!!
    however if I comment out the last line I get
    An error was encountered performing the requested operation :
    ORA-01722: invalid number
    The field request_number is defined as varchar2(30)
    It seems that there is something strange about the way it handles to_number in where clauses.
    Thanks
    Mick Sulley

    You have an invalid number in request_number. If you add "and mtrh.request_number = '135060' ", the result set will be reduced to only those rows which have 135060 in the column and the to_number() will work. WIthout that row, it does to_number(request_number) for all rows in order to identify the one you want. When it comes across a request_number column which contains an invalid number it reports an error.
    <preach>
    If request_number is a number then it should be stored in a number column. If it isn't, don't try an convert it to a number.
    </preach>

  • ORA-01722: invalid number when updating a CMP bean, SP10 WebLogic_RDBMS.jar problem?

    Hi guys
    We are having a problem with the migration to WLCS 3.2 SP2 / WLS 5.1 SP10.
    We are moving from WLCS 3.2 and WLS SP6. Our CMP beans generate errors when
    the container tries to update them. They deploy without error though.
    See below for the stack trace
    We use the recommended weblogic driver for our Oracle 8.1.7.0 database. WL
    runs on w2k, and Oracle on Solaris 7.
    Extract from set-environment:
    SET DB_CLASSPATH=
    SET PATH=%PATH%;%WEBLOGIC_HOME%\bin\oci815_8;%WLCS_ORACLE_HOME%\bin
    SET
    SQLPATH=C:\WebLogicCommerceServer3.2\db\oracle816;C:\WebLogicCommerceServer3
    .2\db\oracle816\event;
    Extract from weblogic.properties:
    weblogic.jdbc.connectionPool.commercePool=\
    url=jdbc:weblogic:oracle,\
    driver=weblogic.jdbc.oci.Driver,\
    I made a few experiments, and I noticed that generating the CMP classes
    (with EJBC) with the old WebLogic_RDBMS.jar (from WLS SP6) is working fine.
    Here is what I mean : ejbc uses the library
    c:\weblogic\lib\persistence\WebLogic_RDBMS.jar And this library has changed
    with SP10. However since that change and after rebuilding our jars, all CMP
    entity beans fail to update.
    If I just replace that WebLogic_RDBMS.jar with the previous one (from SP6),
    and without changing anything else, our CMP beans work fine. I did not
    change any driver or xml deployment descriptor.
    One of the generated files in the jar (for our bean
    VisibilityPSWebLogic_CMP_RDBMS.class) differs, and that seems to be the
    cause of the problem.
    I jadded that class and here is a difference I notice:
    OLD, ejbc ran with SP6 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId =
    (BigDecimal)resultset.getObject(5);
    NEW, ejbc ran with SP10 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId
    = resultset.getBigDecimal(5, 35);
    Similar differences for the SETbigdecimal.
    Dunno if that will help, but I'm attaching the 2 jar files with explicit
    names.
    Damn that was long, I hope someone will read it... Thanks for any help on
    this, see stack trace attached below
    Nicolas Lejeune
    Stack trace:
    mer. oct. 03 12:16:22 CEST 2001:<I> <EJB JAR deployment
    C:/WebLogicCommerceServer3.2/lib/foundation.jar> Exception in
    non-transactional EJB invoke:
    java.rmi.UnexpectedException: Unexpected exception in
    com.b2boost.visibility.VisibilityBean.getVisibilityId():
    java.sql.SQLException: ORA-01722: invalid number
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java:980)
    at
    weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
    47)
    at
    com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.update(VisibilityPSWeb
    Logic_CMP_RDBMS.java:446)
    at
    com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.store(VisibilityPSWebL
    ogic_CMP_RDBMS.java:376)
    at
    weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
    at
    weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
    a:227)
    at
    weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
    a:355)
    at
    weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
    at
    com.b2boost.visibility.VisibilityBeanEOImpl.getVisibilityId(VisibilityBeanEO
    Impl.java:198)
    at
    com.b2boost.visibility.pipeline.LoadFirstVisibilityRequestPC.process(LoadFir
    stVisibilityRequestPC.java:83)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImpl.process(Pipelin
    eExecutorImpl.java:193)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl.process(P
    ipelineExecutorImplEOImpl.java:56)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl_ServiceSt
    ub.process(PipelineExecutorImplEOImpl_ServiceStub.java:154)
    at
    com.beasys.commerce.webflow.PipelineProcessor.callPipeline(PipelineProcessor
    .java:170)
    at
    com.beasys.commerce.webflow.PipelineProcessor.process(PipelineProcessor.java
    :102)
    at
    com.beasys.commerce.webflow.WebflowAdvisor.handleTarget(WebflowAdvisor.java:
    409)
    at
    com.beasys.commerce.webflow.WebflowAdvisor.processTarget(WebflowAdvisor.java
    :156)
    at
    com.b2boost.framework.B2boostPortalDestinationDeterminer.determineDestinatio
    n(B2boostPortalDestinationDeterminer.java:208)
    at
    com.beasys.commerce.foundation.flow.FlowManager.service(FlowManager.java:438
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    [Visibility_generated_with_SP6_weblogic_rdbms_jar.jar]
    [Visibility_generated_with_SP10_weblogic_rdbms_jar.jar]

    You are using WebLogic jDriver for Oracle which needs exact version of OCI API, that comes with the Oracle client installation. Ensure that you have installed the right Oracle client version. And updated the PATH properly.
    I notice that you have
    bin/oci815_8
    oracle816
    Thsi looks liek the inconsistency in your environment.
    What you need to do is
    1. find oci817_8 and place that in the PATH.
    2. install oracle 817 and use that client and set the ORACLE_HOME environment variable and the PATH properly.
    Try this and see if it helps.
    BTW - WLS 5.1 is EOL

  • Warning while submitting XML Publisher Report..

    Hi All,
    I am getting warning status when i run a XML Publisher report..Its Working fine when i previewed in RTF template..
    The Concurrent Program is generating XML Tags..
    Can anyone help me..
    The following is the log file content..
    Arguments
    P_FROM_DATE='2008/09/01 00:00:00'
    P_TO_DATE='2009/01/01 00:00:00'
    P_ORGANIZATION_ID='4052'
    Environment will now switch to UTF-8 code-set.
    Parts of this log file may not display correctly
    as a result. This is an expected behavior.
    XML_REPORTS_XENVIRONMENT is :
    /app/oapps/11.5.5/opm6ora2/8.0.6/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    XENVIRONMENT is set to /app/oapps/11.5.5/opm6ora2/8.0.6/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    AMERICAN_AMERICA.UTF8
    '.,'

    Check OPP log file for any reported errors.
    If you could not find any details in the log file, enable debug on the Output Post Processor, and submit the report again.
    Note: 364547.1 - Troubleshooting Oracle XML Publisher For The Oracle E-Business Suite
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=364547.1

  • Submitting XML Publisher Concurrent Program through PL/SQL

    Hi,
    I am trying to submit a XML Publisher concurrent program through PL/SQL API fnd_request.submit_request.
    The request gets fired and completes successfully but it doesn't pick up the default template attached to it. Its output is plain XML but expected output is PDF report.
    However when I submit this report from SRS, it picks up the default template and gives output in PDF.
    Please let me know what could be going wrong?
    Regards,
    Nitin

    Check out the FND_REQUEST.ADD_LAYOUT API. You need to call it before you submit your report.
    Cheers,
    Dave

  • Mail needs to be sent after submitting XMl publisher report

    HI all,
    I have developed one xml publisher (BI Publisher) report.The requirement is when user submits this report from concurrent program window from his responsibility.mail needs to send one particular mail id.
    Could you please give me any idea...
    Thanks,
    Madhu

    thanks justin...
    I have written that code..but it works...problem is ...i am not able to understand the flow...what happens in the order, until mail is sent...
    i have another code.....
    I have written with out dbms_job, i have witten directly in the trigger itself...
    Tom suggested the procedure, what i have given above..but not the below procedure....
    I am not able to understand, what is the difference between them.....
    CREATE OR REPLACE TRIGGER test_emp_table_trg
    AFTER UPDATE
    ON test_emp_table
    FOR EACH ROW
    WHEN (NEW.sal <> OLD.sal)
    DECLARE
    l_employee_name VARCHAR2 (240);
    l_old_sal VARCHAR2 (240);
    l_new_sal VARCHAR2 (240);
    l_message VARCHAR2 (240);
    BEGIN
    /* Gets the employee full name */
    BEGIN
    SELECT ename
    INTO l_employee_name
    FROM test_emp_table
    WHERE empno = :OLD.empno;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_employee_name := NULL;
    END;
    /* Gets the old Salary */
    BEGIN
    SELECT sal
    INTO l_old_sal
    FROM test_emp_table
    WHERE empno = :OLD.empno;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_old_sal := 0;
    END;
    /* Gets the new position name */
    BEGIN
    SELECT sal
    INTO l_new_sal
    FROM test_emp_table
    WHERE empno= :NEW.empno;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_new_sal := 0;
    END;
    l_message:=
    'Employee Name= '
    || l_employee_name
    || 'Old Salary= '
    || l_old_sal
    || 'New Salary= '
    || l_new_sal;
    BEGIN
    send_mail (l_message);
    END;
    ==========
    can you please describe it clearly???
    thanks in advance my dear friend????
    Edited by: oraDBA2 on Oct 4, 2008 10:26 PM

  • HT204204 Error invalid number when trying to send a TXT message

    While trying to send someone a TXT on craigslist, I inadvertently sent a TXT to a 7 digit number. I received back the following message (Where <XXXXXXX> is the 7 digit number I tried to TXT).
    I'm using an iPhone 6 (brand new) with the latest iOS. Handoff and TXT message forwarding is set up.
    From +1 (1) (216) 116-11:
    <XXXXXXX> Error Invalid Number. Please re-send using a valid 10 digit mobile number or valid short code. (The message I sent went her).
    After that I attempted to send to the correct 10 digit number but every subsequent attempt to message the correct number has failed. I have tried the following:
    Hard reset of the device.
    Deleting the conversation
    Creating a contact with the correct number
    Using Messages to create a new conversation
    Replying to messages received from the number.
    However nothing I've been able to do resulted in a message getting sent.

    I think your region settings are interfering the format of the US number. What country are your region settings set to?
    This is how they should look: +1 (216) 116-1122
    The +1 is optional when inside the USA/Canada

  • ORA-01722: Invalid number when importing .csv file

    Hi,
    I did not find any information regarding my specific problem until now.
    I try to import a *.csv file containing id, double, double, double, double, double (e.g. as a sample line "id_1, 674,6703459157907, 4212,205538937771, 674,6703459158016, 5561,546230769363, 2714,6367797576822") into a table with the following definition:
    CREATE TABLE "foo"."BUILDING_SURFACES"
    (     "ID" VARCHAR2(40 BYTE),
         "AREA1" BINARY_DOUBLE DEFAULT 0,
         "AREA2" BINARY_DOUBLE DEFAULT 0,
         "AREA3" BINARY_DOUBLE DEFAULT 0,
         "AREA4" BINARY_DOUBLE DEFAULT 0,
         "AREA5" BINARY_DOUBLE DEFAULT 0
    ) SEGMENT CREATION IMMEDIATE
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
    TABLESPACE "USERS" ;
    I am doing it with the help of the importer tool in the SQLDeveloper, by doing a right-click onto the table and selecting import data. In the assistant everything seem to be fine, even the data preview.
    But when I try to import, I get an error: "ORA-01722: Invalid number" and a couple of failure windows appear. These windows display a NullPointerException:
    java.lang.NullPointerException
         at oracle.dbtools.raptor.data.writers.DataTypeFormatterRegistry.getFormattor(DataTypeFormatterRegistry.java:42)
         at oracle.dbtools.raptor.data.writers.ImportGenerator.getBatchForInsert(ImportGenerator.java:1837)
         at oracle.dbtools.raptor.data.writers.ImportGenerator.access$1800(ImportGenerator.java:84)
         at oracle.dbtools.raptor.data.writers.ImportGenerator$1.afterLoopProcessing(ImportGenerator.java:1125)
         at oracle.dbtools.raptor.newscriptrunner.ScriptExecutorTask.loopThroughAllStatements(ScriptExecutorTask.java:220)
         at oracle.dbtools.raptor.newscriptrunner.ScriptExecutorTask.doWork(ScriptExecutorTask.java:165)
         at oracle.dbtools.raptor.data.writers.ImportGenerator$1.doWork(ImportGenerator.java:782)
    If I cancel the task, the insert statements are displayed:
    SET DEFINE OFF
    --Einfügen für Zeilen  1  bis  2  nicht erfolgreich
    --ORA-01722: Ungültige Zahl
    --Zeile 1
    INSERT INTO BUILDING_SURFACES (ID, AREA1, AREA2, AREA3, AREA4, AREA5) VALUES ('BLDG_0003000b002ea10f','674.6703459157907','4212.205538937771','674.6703459158016','5561.546230769363','2714.6367797576822');
    --Zeile 2
    As one can see, the numbers are quoted ('). If I delete the quotes by hand, the insert statement works correctly.
    What can I do, so that the import tool does not quote the numbers?
    Deleting the quotes with the help of a regular expression is not workaround, since a lot of error windows appear, which needs to be closed by hand...
    Thanks in advance,
    Richard
    Some infos about my machine:
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 12.10
    Release: 12.10
    Codename: quantal
    $ java -version
    java version "1.6.0_38"
    Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
    Oracle SQL Developer 3.2.20.09
    Version 3.2.20.09
    Build MAIN-09.87
    Copyright © 2005, 2012 Oracle. All Rights Reserved. Alle Rechte vorbehalten.
    IDE Version: 11.1.1.4.37.59.48
    Product ID: oracle.sqldeveloper
    Product Version: 11.2.0.09.87

    I solved my problem. :)
    I changed the datatype of the area fields to "NUMBER" and edited my input file in a way, that it is tab separated with "," as decimal sign.
    Richard

  • Excel output gets expanded when developing Xml publisher report !!

    I am developing a report using XML publisher which generates Excel output ....
    And my layout keeps repeating for every unique delivery...(i am passing 'x' deliveries as input)
    1) When i try to generate a pdf output, my report works fine but when i try to generate an excel output the table size expands..
    2) The jpg file inserted in the rtf(layout template) appears when i generate pdf report and does not appear in the excel output..
    What could be the reason ??

    Hi;
    Please see below thread which could be helpful for your issue:
    XML PUBLISHER report in Excel out put problem
    Regard
    Helios

  • ORA-01722: Invalid number when implementing the Ruby article sample

    Hi all,
    When I implemented the Ruby on Rails article posted in http://www.oracle.com/technology/pub/articles/haefel-oracle-ruby.html, I found the following problem:
    Everything was fine until I decided to test my application. When my web app tried to access some record of the table, the following error happened:
    OCIError: ORA-01722: invalid number: select * from (select raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM comics WHERE (comics.id = '2.0') ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0
    F:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log'
    F:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/oracle_adapter.rb:277:in `execute'
    F:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/oracle_adapter.rb:477:in `select'
    F:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/oracle_adapter.rb:268:in `select_all'
    F:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:390:in `find_by_sql'
    F:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:924:in `find_every'
    F:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:918:in `find_initial'
    F:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:952:in `find_one'
    F:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:941:in `find_from_ids'
    F:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:382:in `find'
    #{RAILS_ROOT}/app/controllers/comics_controller.rb:16:in `show'
    The problem was related with the way RoR is accessing my table. I don't know the reason, but RoR is automatically building the SELECT sentence declaring my 'id' column as VARCHAR, so the sentence includes the expression " comics.id = '2.0' ".
    I would like to hear the advice from more experienced RoR developers in order to solve this little issue... (I believe this is more a RoR problem than an Oracle one, but I didn't find anything useful in Rail forums).
    Thank you very much in advance for your help.
    Gregorio

    Are you saying that if you do not modify the WHERE condition and run the SELECT as-is (as in your original post) in SQL*Plus, you get the same error?
    Can you post a test case? I'm not getting any error in example below.
    SQL> create table comics (id number) ;
    Table created.
    SQL> insert into comics values ('2.0') ;
    1 row created.
    SQL> insert into comics values ('2') ;
    1 row created.
    SQL> insert into comics values (2.0) ;
    1 row created.
    SQL> insert into comics values (2) ;
    1 row created.
    SQL> commit ;
    Commit complete.
    SQL> select * from comics WHERE (comics.id = '2.0') ;
            ID
             2
             2
             2
             2
    4 rows selected.
    SQL> drop table comics ;
    Table dropped.
    SQL> create table comics (id varchar2(10)) ;
    Table created.
    SQL> insert into comics values ('2.0') ;
    1 row created.
    SQL> insert into comics values ('2') ;
    1 row created.
    SQL> insert into comics values (2.0) ;
    1 row created.
    SQL> insert into comics values (2) ;
    1 row created.
    SQL> select * from comics WHERE (comics.id = '2.0') ;
    ID
    2.0
    1 row selected.
    SQL>Message was edited by:
    Kamal Kishore

  • ORA-01722: invalid number - when last column has numbers that has a decimal seperator

    Below is the sample data -
    FRT,1.64,VAT,23.36
    FRT,1.64,VAT,23.36
    When I try to convert 1.64 to to_number all is good but when I do the same with 23.36 I get the following error
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-01722: invalid number
    ORA-06512: at "SYS.ORACLE_LOADER", line 52
    I tried this query as well
    select to_number(CONSIGNMENT_NET_VALUE) as Col1 from DUMP_EXT
    select to_number(CONSIGNMENT_NET_VALUE,'9999999999D99999','NLS_NUMERIC_CHARACTERS='',.''' ) as Col1 from DUMP_EXT --> 268906.1
    getting the same error - any help greatly appreciated.
    T.
    Srini

    Hi,
    You can check this test case
    SQL> !cat a.txt
    FRT,1.64,VAT,23.36
    FRT,1.64,VAT,56.36
    FRT,1.64,VAT,23.36
    SQL> create table DUMP_EXT
        Charge_ID_FRT VARCHAR2(50),
        Net_Amount_VAT VARCHAR2(50),
        Charge_ID_VAT VARCHAR2(50),
        Consignment_Net_Value VARCHAR2(50)
    ORGANIZATION EXTERNAL
        (TYPE ORACLE_LOADER
        DEFAULT DIRECTORY DATA_DD_DIR
        ACCESS PARAMETERS
            (RECORDS DELIMITED BY '\n'
            SKIP 1
            BADFILE 'bad_%a_%p.bad'
            LOGFILE 'log.log'
            FIELDS TERMINATED BY ','
            MISSING FIELD VALUES ARE NULL
            REJECT ROWS WITH ALL NULL FIELDS
                Charge_ID_FRT CHAR(50),
                Net_Amount_VAT CHAR(50),
                Charge_ID_VAT CHAR(50),
                Consignment_Net_Value CHAR(50)
        LOCATION ('a.txt')
    reject limit 0;
      2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28 
    Table created.
    SQL> select charge_id_frt,net_amount_vat,charge_id_vat,consignment_net_value from dump_ext;
    CHARG NET_AMOUNT_VAT                                     CHARG CONSIGNMENT_NET_VALUE
    FRT   1.64                                               VAT   56.36
    FRT   1.64                                               VAT   23.36
    --- Get Error here
    SQL> select to_number(CONSIGNMENT_NET_VALUE,'99D99','NLS_NUMERIC_CHARACTERS='',.''' ) as Col1 from DUMP_EXT
      2  /
    select to_number(CONSIGNMENT_NET_VALUE,'99D99','NLS_NUMERIC_CHARACTERS='',.''' ) as Col1 from DUMP_EXT
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-01722: invalid number
    -- Check the Variable at DB level
    SQL>   SELECT value   FROM NLS_DATABASE_PARAMETERS  WHERE parameter='NLS_NUMERIC_CHARACTERS';
    VALUE
    -- Use the Query like
    SQL> select to_number(CONSIGNMENT_NET_VALUE,'99D99','NLS_NUMERIC_CHARACTERS=''.,''' ) as Col1 from DUMP_EXT;
          COL1
         56.36
         23.36
    HTH

Maybe you are looking for