Overflow/problem with ESQL-Integer and SQL-Number (Oracle) - Websphere

This is a discussion on Overflow/problem with ESQL-Integer and SQL-Number (Oracle) - Websphere ; Hi, my ESQL-script investigates values from a source and creates a SQL statement (insert). One field raises a problem and it seems to be something like an classic overflow error. The field on the ESQL-side is declared as an INTEGER. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Overflow/problem with ESQL-Integer and SQL-Number (Oracle)

  1. Overflow/problem with ESQL-Integer and SQL-Number (Oracle)

    Hi,

    my ESQL-script investigates values from a source and creates a SQL statement (insert). One field raises a problem and it seems to be something like an classic overflow error.

    The field on the ESQL-side is declared as an INTEGER. In the database the field is declared as a number(10). If the source-value has exactly 10 digits, then the value in the database is different and negative (therefore it looks like an overflow). The user trace shows, that the investigated value on ESQL-side is OK. If I execute the INSERT-statement manually everything is OK, too.

    Are there any ideas?

    Thanks

  2. Re: Overflow/problem with ESQL-Integer and SQL-Number (Oracle)

    I am not a database expert so I am using a bit of a common sense guess here.

    I have to wonder since the manual insert works if there is some
    disconnect between the ESQL processor and the database system. If so
    these can often be resolved by using the PASSTHRU statement. This
    essentially bypasses any EQSL processing of the INSERT statement and
    throws it directly over the wall to the database engine.


    heinz_bert_2006@yahoo.de wrote:

    >Hi,
    >
    >my ESQL-script investigates values from a source and creates a SQL statement (insert). One field raises a problem and it seems to be something like an classic overflow error.
    >
    >The field on the ESQL-side is declared as an INTEGER. In the database the field is declared as a number(10). If the source-value has exactly 10 digits, then the value in the database is different and negative (therefore it looks like an overflow). The user trace shows, that the investigated value on ESQL-side is OK. If I execute the INSERT-statement manually everything is OK, too.
    >
    >Are there any ideas?
    >
    >Thanks
    >
    >


  3. Re: Overflow/problem with ESQL-Integer and SQL-Number (Oracle)

    PASSTHRU('SELECT R.* FROM Schema1.Table1 AS R WHERE R.Name = ? OR R.Name =
    ? ORDER BY Name'
    TO Database.DSN1
    VALUES ('Name1', 'Name4'));

+ Reply to Thread