|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Oracle datatype NUMERIC problem |
« View previous topic :: View next topic » |
Author |
Message
|
Gama |
Posted: Fri Dec 26, 2008 9:32 am Post subject: Oracle datatype NUMERIC problem |
|
|
 Centurion
Joined: 11 Jan 2005 Posts: 103 Location: Portugal
|
Hello all,
when i select data from oracle 9.2 table with wmb6.0 on windows 2k environment box the result of the numeric field cames "nE+0"
(0x03000000):ID = 0E+0
(0x03000000):NUM_CARGAS = 3E+0
(0x03000000):AREA = 'E NORTE'
(0x03000000):COD_AREA = 3
this case is only if the field is numeric without precisions, like you can see on describe below
DESC <table name>
Name Null Type
------------------------------ -------- --------------
ID NUMBER
NUM_CARGAS NUMBER
AREA VARCHAR2(20)
COD_AREA NUMBER(4)
when i try make a cast of the field ID to integer, returns an error.
So can any one help-me?
Thanks,
Best Regards
Gama.
Last edited by Gama on Fri Dec 26, 2008 2:04 pm; edited 1 time in total |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 26, 2008 11:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Suspecting that the field is in char can you first make a cast to float with format and then a cast of the float to integer?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Gama |
Posted: Fri Dec 26, 2008 2:09 pm Post subject: |
|
|
 Centurion
Joined: 11 Jan 2005 Posts: 103 Location: Portugal
|
fjb_saper wrote: |
Suspecting that the field is in char can you first make a cast to float with format and then a cast of the float to integer?  |
Hello fjb_saper, thanks for your post, but "ID" and "NUM_CARGAS" are NUMERIC without any precision like is mentioned on Oracle table describe, but like you can see the "COD_AREA" is numeric but it has precision (4)
ID NUMBER
NUM_CARGAS NUMBER
AREA VARCHAR2(20)
COD_AREA NUMBER(4)
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 26, 2008 4:46 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Gama wrote: |
fjb_saper wrote: |
Suspecting that the field is in char can you first make a cast to float with format and then a cast of the float to integer?  |
Hello fjb_saper, thanks for your post, but "ID" and "NUM_CARGAS" are NUMERIC without any precision like is mentioned on Oracle table describe, but like you can see the "COD_AREA" is numeric but it has precision (4)
ID NUMBER
NUM_CARGAS NUMBER
AREA VARCHAR2(20)
COD_AREA NUMBER(4)
Thanks |
It may be a number in the oracle definition of the DB. Obviously it is passed back to the broker into a float hence the
(0x03000000):ID = 0E+0
(0x03000000):NUM_CARGAS = 3E+0
notation in the trace.
Either this notation is translated into char or this is the char output of a float (or maybe a double). In any case it shows that you do not have the format you think you do.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|