If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Discovery Link and Datatypes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-04, 13:31
canada1 canada1 is offline
Registered User
 
Join Date: Jan 2004
Posts: 5
Discovery Link and Datatypes

I am experiencing some difficulties displaying numerical datasets in their proper format using Information Integrator and would appreciate some feedback on proper query construction. In the example I have included, the database value I wish to retrieve is 2.66. When I construct the standard query:

"select x from y where x is ..." the value that is returned is displayed as +2.66000000000000E+000

I am not very familiar with DB2 datatypes and would like to revise the above query to display 2.66. Any suggestions?

Thanks
Reply With Quote
  #2 (permalink)  
Old 01-20-04, 14:00
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Try using:

select DECIMAL(X,5,2) from y where x ...
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 01-21-04, 11:22
canada1 canada1 is offline
Registered User
 
Join Date: Jan 2004
Posts: 5
Thanks for your reply. While it did help, I now seem to be encountering a numeric overflow problem. I've attempted to detail my exact problem. Hopefully someone has encountered this and solved it before. Using the IBM DB2 command center GUI, I'm creating a SQL query. The federated target of my query is an Oracle table with 5 columns:
Column Name Datatype
a FLOAT
b FLOAT
c FLOAT
d FLOAT
f NUMBER
g NUMBER

When creating my SQL query I know the return values will be the following:

a FLOAT 239.9
b FLOAT 2.38
c FLOAT -0.74
d FLOAT -1.26
f NUMBER 402303
g NUMBER 55359


When I attempt to run the SQL query I've created, I receive a SQL0413N Overflow occurred during numeric data type conversion error. Any information you could provide would be appreciated. Here is the SQL syntax:

select
decimal(a,5,2) as a,
decimal(b,5,2) as b,
decimal(c,5,2) as c,
decimal(d,5,2) as d,
integer(f) as f,
integer(g) as g from
x
where f in(1,2,3,4) and
g = 5;
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On