Error ORA-01426: numeric overflow when Creating table with double data type
Hi,
I am using ODP.NET to create a table with data from SQL to Oracle. The problem is with double data type fields that is equivalent to FLOAT(49) in Oracle. My syntax is:
CREATE TABLE SCOTT.ALLTYPES
F1 NUMBER(10),
F10 DATE,
F2 NUMBER(10),
F3 NUMBER(5),
F4 NUMBER(3),
F5 FLOAT(23),
F6 FLOAT(49),
F7 NUMBER (38,5),
F8 NVARCHAR2(500),
F9 NVARCHAR2(500)
Th error is with field F6 but I am not sure what is the correct type equivalent to double in SQL.
I woul appreciate if anyone can help me with this problem.
Sunny
Does this simple test work for you?
In database:
create table float_test
f1 float(49)
);C# code:
using System;
using System.Data;
using System.Text;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
namespace FloatTest
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
// connect to local db using o/s authenticated account
OracleConnection con = new OracleConnection("User Id=/");
con.Open();
// will hold the value to insert
StringBuilder sbValue = new StringBuilder();
// create a string of 49 number 9's
for (int i = 0; i < 49; i++)
sbValue.Append("9");
// command object to perform the insert
OracleCommand cmd = con.CreateCommand();
cmd.CommandText = "insert into float_test values (:1)";
// bind variable for the value to be inserted
OracleParameter p_value = new OracleParameter();
p_value.OracleDbType = OracleDbType.Double;
p_value.Value = Convert.ToDouble(sbValue.ToString());
// add parameter to collection
cmd.Parameters.Add(p_value);
// execute the insert operation
cmd.ExecuteNonQuery();
// clean up
p_value.Dispose();
cmd.Dispose();
con.Dispose();
}SQL*Plus after executing above code:
SQL> select * from float_test;
F1
1.0000E+49
1 row selected.- Mark
Similar Messages
-
ORA-01426: numeric overflow when creating job
Hello,
When executing the following script to create a job I get the error "ORA-01426: numeric overflow" . When I execute the same script on another database with same version and same configuration I do not get the error and the job is created.
Can anyone help me out solving this issue?
Script:
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'insert into dba.dba_logs values (''SGC'',''TRL03'',sysdate,null);
commit;
,next_date => to_date('07-11-2010 02:00:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'NEXT_DAY(TRUNC(SYSDATE)+2/24,''SUNDAY'')'
,no_parse => FALSE
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
Database version: 11.2.0.1
OS: HPUXWe are planning to migrate to dbms_scheduler, but that's in the future. for now we have this error first to solve.
We also tried the following with dbms_scheduler and it gives the same error. The strange is that in another database with same version and same OS it works fine.
BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB
job_name => 'JOB_CLIENTES_IN'
,start_date => SYSTIMESTAMP
,repeat_interval => 'FREQ=MINUTELY;INTERVAL=10'
,end_date => NULL
,job_type => 'STORED_PROCEDURE'
,enabled => TRUE
,job_action => 'JOB_CLIENTES_FTP_IN'
,comments => 'Job que carrega os ficheiros de pre-aviso de cliente'
END;
ORA-01870: the intervals or datetimes are not mutually comparable
ORA-01426: numeric overflow
ORA-01426: numeric overflow
ORA-06512: at "SYS.DBMS_ISCHED", line 124
ORA-06512: at "SYS.DBMS_SCHEDULER", line 271
ORA-06512: at line 2
Edited by: cibernauta on Nov 4, 2010 12:48 PM -
ORA-01426: numeric overflow, while migrating "float" values
When I try to insert a value of *2.58612749363472E302* (originally a "float" in SQL DB) into an Oracle column of type float(126), I get this error "ORA-01426: numeric overflow"
I tried changing the column type to BINARY_FLOAT, BINARY_DOUBLE, but I still get same error.
I'm using Oracle SQL Developer (2.1.1.64.45) to migrate a SQL Server 2005 Database to Oracle 11g.
Do you have any thoughts on this? Or workarounds?
Thanks in advance.
ArulArul,
I have checked the Migration Workbench documentation where it says for float data -
Oracle® SQL Developer
Supplementary Information for Microsoft SQL Server and
Sybase Adaptive Server Migrations
Release 2.1
Table 2–2 Data Types in Oracle and Microsoft SQL Server or Sybase Adaptive Server
NOTE: If you try to migrate
floating point data greater
than or equal to 1.0E+126
then SQL Developer will fail
to insert this data in the
Oracle database and1 will
return an error.This also
applies to negative values
less than or equal to
-1.0E+126.
So, if I understand it correctly your value of 2.58612749363472E302 is outside this range.
Regards,
Mike -
Error message "ORA-01426: numeric overflow"
Could somebody please explain with me examples as when you get this error.
error message "ORA-01426: numeric overflow"
Thank You for your help.You get 1426 when a number, usually from a caclulation, is too big, or too small for Oracle to represent. For example:
SQL> SELECT POWER(99,99) FROM dual;
SELECT POWER(99,99) FROM dual
ERROR at line 1:
ORA-01426: numeric overflowwhich my calculator tells me is 3.6973E+197
TTFN
John -
ORA-01426: Numeric Overflow During Cube Build (Doc ID 1494869.1)
Our cube builds starting failing and we received this error after the cube log table sequence reached 32787.
After recreating the sequence the builds run successfully. This seems to be an unacceptable bug for an enterprise level product.
I have been unable to find a patch on the Oracle support site for it. Is a patch avaliable?
COMP_NAME
VERSION
OLAP Analytic Workspace
11.2.0.4.0
Oracle OLAP API
11.2.0.4.0
OLAP Catalog
11.2.0.4.0I found what appears to be a related bug Bug 14627371 - ORA-01426: NUMERIC OVERFLOW DURING CUBE BUILD
. This bug is marked as fixed in 12.1 of the database.
I think that you may want to pursue this issue with support to see whether this can be back-ported ton 11.2.0.4.0.
--Ken Chin -
[Oracle][ODBC][Ora]ORA-01426: numeric overflow
I have a function get data from data base and do some calculating. I call this function from ASP web page. Some times I got the following error. But if I click refresh later. It's ok again. Any ideas?
[Oracle][ODBC][Ora]ORA-01426: numeric overflowCause: Evaluation of an value expression causes an overflow/underflow.
Action: Reduce the operands. -
How To Create Table with Static Data
JDEV 10.1.3
ADF BC
ADF Faces
I am trying to make some simple screen/screenflow diagrams to help flesh out some requirements. To do that, I need to make a table with static data that is not hooked up to a data source (because the data model has not yet been clearly defined, and I'm using the diagrams to help iterate the requirements).
Is it possible to create a table that shows static data (i.e. a set of rows that does not come from a model data source, but rather is hardcoded.)
If not, how does one create mock ups without actually implementing the data model?
Thank you.Deepak, what specifically in those 2 links from Amis are useful? Those 2 posts are about bind variables, not static list of values?
In response to the original poster, I'll attempt to help a little more.
In the 11g release you can create VOs based on a static list of values. However in your case on 10.1.3, the best method I've found is to create a VO based on a SELECT <columns> FROM DUAL statement. The columns then include your dummy data. If you need more than one row, simply UNION ALL a number of SELECT statements together.
What I haven't checked, is when you eventually transform the VO based on the SELECT DUAL statement into a VO based on an EO drawing real data from the database, is it an easy process? I recommend you try this out before committing to the approach above. Let us know how you go.
Regards,
CM. -
Urgent : ORA-01426: numeric overflow on oracle 11g Active Data Guard
Hi
I have configured Active Data Guard on oracle 11g, for reporting purpose we will select mutliple querry on target side(10 users). we are getting 'numeric overflow erro'r on alert log file When we issuing multiple query on target side. PLeae let me know is this error will cause performance degrad. if it will degrade performance mean please tell me how to resolve this problem. Why the numeric overflow is comming . and it is not comming in the primary database, it is comming in standby database only. please any one help it is very urgent
is there any parameter To overcome this problme
Please please it is very important to me and very urgent .
Thanks
nafees
Edited by: Nafees on Jan 1, 2009 3:44 AM
Edited by: Nafees on Jan 1, 2009 3:54 AMThere is no one drowning.
Your house is not on fire.
The volcano has not exploded.
Please apologize for abusing this forum by claiming your issue is more urgent than other people's requests.
Then, and only then, should anyone help you. I know I certainly won't until I read your sincere apology and promise not to be abusive in the future. -
Error when creating table with nested table of object
Dear all,
I tried to create a table that contains nested table of an object but got an error:
create or replace type some_obj is object (
a number, b blob
4 /
Type created.
create or replace type some_type is table of some_obj;
2 /
Type created.
SQL>
create table test (obj_id number, temp some_type) nested table temp store as nes_tab;
Table created.
SQL> create table test (obj_id number, temp some_type) nested table temp store as nes_tab
ERROR at line 1:
ORA-00955: name is already used by an existing objectWhat is causing the error? How can I troubleshoot this?
best regards,
ValValerie Debonair wrote:
never mind, I put "/" at the end of the create statement that makes executing create table twice....Yep. If I'm writing a script, I tend to just stick with "/" for all my statements, including the SQL as well as the DDL, otherwise it can be confusing whether a ";" is needed or not or whether it will try and execute it twice like you found.
"/" works for all. -
Can not create table with the CLOB type VARRAY, ORA-02348: cannot create VA
CREATE OR REPLACE TYPE Project AS OBJECT (
project_no NUMBER(2),
title VARCHAR2(35),
cost CLOB );
CREATE OR REPLACE TYPE ProjectList AS VARRAY(50) OF Project;
CREATE TABLE department (
dept_id NUMBER(2),
name VARCHAR2(15),
budget NUMBER(11,2),
projects ProjectList );
The table creatation always with the error :
ORA-02348: cannot create VARRAY column with embedded LOB
Can anybody help ???Hi Peng,
It seems you have hit a limitation of the Oracle version, which you don't post.
Limitations are sometimes also called a 'feature'.
You would need to find out whether this restriction has been lifted in a subsequent release or redesign your application.
Sybrand Bakker
Senior Oracle DBA -
Moving a table with long data type column
hi
1.how to move a table with a long data type column in 8.1.7.3.0 ver database.
alter table APPLSYS.FND_LOBS_DOCUMENT move lob(BLOB_CONTENT) store as (tablespace testing)
ERROR at line 1:
ORA-00997: illegal use of LONG datatype
2. and a table with varray type column
alter table APPLSYS.WF_ERROR move lob("USER_DATA"."PARAMETER_LIST") store as (tablespace testing)
ERROR at line 1:
ORA-22917: use VARRAY to define the storage clause for this column or attribute
table description is:
SQL> desc applsys.wf_error;
Name Null? Type
Q_NAME VARCHAR2(30)
MSGID NOT NULL RAW(16)
CORRID VARCHAR2(128)
PRIORITY NUMBER
STATE NUMBER
DELAY DATE
EXPIRATION NUMBER
TIME_MANAGER_INFO DATE
LOCAL_ORDER_NO NUMBER
CHAIN_NO NUMBER
CSCN NUMBER
DSCN NUMBER
ENQ_TIME DATE
ENQ_UID NUMBER
ENQ_TID VARCHAR2(30)
DEQ_TIME DATE
DEQ_UID NUMBER
DEQ_TID VARCHAR2(30)
RETRY_COUNT NUMBER
EXCEPTION_QSCHEMA VARCHAR2(30)
EXCEPTION_QUEUE VARCHAR2(30)
STEP_NO NUMBER
RECIPIENT_KEY NUMBER
DEQUEUE_MSGID RAW(16)
SENDER_NAME VARCHAR2(30)
SENDER_ADDRESS VARCHAR2(1024)
SENDER_PROTOCOL NUMBER
USER_DATA APPS.WF_EVENT_T
lob column:
SQL> select owner,table_name,column_name from dba_lobs where table_name='WF_ERROR';
OWNER TABLE_NAME COLUMN_NAME
APPLSYS WF_ERROR "USER_DATA"."PARAMETER_LIST"
APPLSYS WF_ERROR "USER_DATA"."EVENT_DATA"
pls help me
thanks and regards
srinivas1. Export and import
2. Sql*Plus 'copy' command
It is a good idea to move from 'LONG' to 'CLOB'. -
ORA-03237 when creating table with BLOB columns on Oracle 9i
I am playing with my new Oracle 9i database. I am trying to copy
tables from my 8.1.6 db. Three tables won't create due to this
new message. The 9i documentation says it's soemthing to do with
freelist groups but my DBA says he hasn't set up any.
The tablespace is one of these newfangled locally managed
tablespaces (predetermined size 8k).
I can create these tables if I change the BLOB column to datatype
VARCHAR2(4000).
I have raised this through the usual channels, but I thought I'd
try this site as well.
Cheers, APCvictor_shostak wrote:
Figured, Virtual Columns work only for Binary XML.They are only supported, currently, for Binary XML. -
Unexpected Numeric Overflow on empty tables when scanning with DMU
I have an instance of oracle running on an isolated network (oracle 11.2.0.3), on a Windows Server 2008 r2, x64 dell R705 server
When using the DMU to scan tables, I get the following error:
ORA-01426: numeric overflow
DBMS_DUMA_INTERNAL: line 8
DBMS_DUMA_INTERNAL: line 43
at line 1
I get his on multiple tables, but in each case, the table is empty (0 rows)
Can I safely ignore this? How do I get DMU to ignore the errors and continue?
Thanks in advance.The fix for bug 8743409 is not included in the 11.2.0.1 release. Please check the DMU supported configurations. In order to use DMU on any versions of the database before 11.2.0.3, you need to apply a prerequisite server-side patch on one of the supported configurations. If you can upgrade to 11.2.0.3, there is no need to apply additional patches and the aforementioned fix is included.
-
Unable to create table with column default value with date interval
Please help to create table with calculated date defaullt value:
CREATE TABLE emp (
birth_date DATE DEFAULT sysdate + interval '3' day NOT NULL
or
CREATE TABLE emp (
some_date DATE,
birth_date DATE DEFAULT some_date NOT NULL
or
CREATE TABLE emp (
some_date DATE,
birth_date DATE DEFAULT some_date + interval '3' day NOT NULL
below syntax error:
TT1001: Syntax error in SQL statement before or at: "+"I'm afraid this is not possible; as per the SQL Reference, TimesTen only supports 'constant expressions' for the DEFAULT clause and none of these are constant expressions.
Chris -
ORA-19007 when coping a table with an xml type in it to a new schema in the
ORA-19007 when coping a table with an xml type in it to a new schema in the same database.
Hi all,
When I copy a table with an xml type in it to a new schema in the same database I get an ora-19009.
The setup is as follows I have a schema a with table TABLE_WITH_XMLTYPE where data is:
CREATE
TABLE TABLE_WITH_XMLTYPE
FOLDER_ID NUMBER (10, 0) NOT NULL,
SEARCH_PROPERTIES XMLTYPE ,
CONSTRAINT TABLE_WITH_XMLTYPE PK PRIMARY KEY (FOLDERID) USING INDEX
XMLTYPE COLUMN SEARCH_PROPERTIES XMLSCHEMA
"http://xxxxxxx.net/FolderProperties.xsd" element "FolderProperties"
VARRAY SEARCH_PROPERTIES."XMLDATA"."PROPERTIES"."PROPERTY" STORE AS TABLE
PROPERTY_TABLE
(PRIMARY KEY (NESTED_TABLE_ID, ARRAY_INDEX)) ORGANIZATION INDEX OVERFLOW
Both schemas have the following xml schema registered as a local xml schema
BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'http://xxxxxxx.net/FolderProperties.xsd',
SCHEMADOC =>
'<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb"
xdb:storeVarrayAsTable="true">
<xs:element name="FolderProperties"
type="FolderPropertiesType"
xdb:defaultTable="FOLDER_SEARCH_PROPERTIES" />
<xs:complexType name="FolderPropertiesType" xdb:SQLType="FOLDERPROPERTIES_T">
<xs:sequence>
<xs:element name="FolderID" type="FolderIDType" minOccurs="1" xdb:SQLName="FOLDER_ID"/>
<xs:element name="Properties" type="PropertiesType" xdb:SQLName="PROPERTIES"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PropertiesType" xdb:SQLType="PROPERTIES_T">
<xs:sequence>
<xs:element name="Property" type="PropertyType" maxOccurs="unbounded"
xdb:SQLName="PROPERTY" xdb:SQLCollType="PROPERTY_V"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PropertyType" xdb:SQLType="PROPERTY_T">
<xs:sequence>
<xs:element name="DateValue" type="DateType" xdb:SQLName="DATE_VALUE"/>
<xs:element name="NumValue" type="NumType" xdb:SQLName="NUM_VALUE"/>
<xs:element name="StringValue" type="StringType" xdb:SQLName="STRING_VALUE"/>
</xs:sequence>
<xs:attribute name="Name" xdb:SQLName="NAME" xdb:SQLType="VARCHAR2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="FolderIDType">
<xs:restriction base="xs:integer"/>
</xs:simpleType>
<xs:simpleType name="DateType">
<xs:restriction base="xs:dateTime"/>
</xs:simpleType>
<xs:simpleType name="NumType">
<xs:restriction base="xs:decimal"/>
</xs:simpleType>
<xs:simpleType name="StringType">
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:schema>',
LOCAL => TRUE,
GENTYPES => TRUE,
GENTABLES => FALSE);
END;
when I try to do the following insert:
insert into schemaB.TABLE_WITH_XMLTYPE ( FOLDER_ID, SEARCH_PROPERTIES)
select FOLDER_ID, SEARCH_PROPERTIES from schemaB.TABLE_WITH_XMLTYPE;
I’ll get an ora-19007.
Can some one point me in the right direction how to solve this error.
Thanks Roelof.Who did you create the second table, in other words, how did you COPY the table as you said...
If you created the second table via a CTAS (create table as select) then you will have created a table that is not the same as the original one. AFAIK I have once created an enhancement request for this after discovering that JDeveloper, for example, creates a "copy" via a CTAS which creates the wrong structure. Double check via package DBMS_METADATA.
SQL> set long 1000000
SQL> select DBMS_METADATA('TABLE','TABLE_WITH_XMLTYPE','SchemaA') from dual;
SQL> select DBMS_METADATA('TABLE','TABLE_WITH_XMLTYPE','SchemaB') from dual;If you have got two different tables, than Mark's solution should help.
M.
Edited by: Marco Gralike on Feb 15, 2009 11:16 AM
Maybe you are looking for
-
In OBIEE 11g How to Change Import Type Local Machine to Remote Machine
Hi All, I Have Installed OBIEE 11g Client tools in my Machine and server is in Other Server.when i tried to Import metadata i am getting Connection Falied error. When i tried to import metadata in import type option i can see only one option Local Ma
-
How do I move a list item to the left?
I need help formatting graphic banners inside a list. What I'm doing: Updating a very old pre-CSS site with messy, messy code. The layout is done by tables within tables within tables (three layers of nested tables.) In the innermost table, the right
-
REUSE_ALV_GRID_DISPLAY == How to add a new line?
Hello SDN community, I'm using the "REUSE_ALV_GRID_DISPLAY" function with "i_save = 'X'". How can I solve the following problem: I want to insert a new line into the ALV and after a click on the SAVE Button, the internal table should have this new li
-
I've looked up previous discussions and to be honest have no idea how to fix the issue. I've tried manual sync, auto sync, deleted, redownloaded and tried again to no avail. I don't understand some of the posts that have been out there on changing
-
I can't find the "Sync" button under "Photos" to transfer my photos onto my iPod
I cannot sync my photos to my iPod. I followed the directions by there is no "Sync" button under "Photos"