View previous topic :: View next topic
|
Author |
Message |
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
Dear Experts,
I have 2 Fields with datatype DECIMAL shown as below in my DB2 table.
COLNAME COLTYPE LENGTH SCALE
------- -------- ------ ------
QTY1 DECIMAL 15 3
QTY2 DECIMAL 15 2
Code: |
Values in these columns looks like
------------------ ------------------
-93058000.000 -99160692.50
-100000.000 -106557.94
-54000.000 -54183.33
-4403000.000 -4691746.32
-2489000.000 -2652227.25
-50000.000 -54261.84 |
When I retrieve the columns as it as, they are displyed as NULL and junk values in my output report.
How to write a SELECT Query to retrieve the values as it is as shown above. i.e converting them into CHAR.
Please suggest .. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
When I retrieve the columns as it as, they are displyed as NULL and junk values in my output report.
How to write a SELECT Query to retrieve the values as it is as shown above. i.e converting them into CHAR.
What are you using to select the data for the report?
Maybe that "JUNK VALUES" is packed decimal values? |
|
Back to top |
|
|
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
Hi Crag,
I used the function CHAR(QTY1) and CHAR(QTY2). and got the outputs as expected. bu leading Zeroes. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Does this mean that all is well or is there still something that needs help?
Quote: |
bu leading Zeroes. |
|
|
Back to top |
|
|
|