View Single Post
  #18 (permalink)  
Old 04-06-09, 02:37
tonkuma tonkuma is online now
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 2,188
ratheeshnellikkal, No.
I wrote:
Quote:
I tried to fix the issue(nitya_modified). But, I couldn't do it(minus sign is not displayed for 0 > field_value > -1).
Because, there is no minus zero(-0) in DB2. Zero is implicitly assumed plus.

Here is an example:
Code:
------------------------------ Commands Entered ------------------------------
SELECT FEILD_NAME
     , rtrim (char (integer (FEILD_NAME))) || '.'
       || substr (char (FEILD_NAME),
                  locate ('.', char (FEILD_NAME))+1,
                  length (char (FEILD_NAME)) - locate ('.', char (FEILD_NAME))
                 ) AS ratheeshnellikkal
  FROM
     ( SELECT DEC(d,18,3) AS FEILD_NAME
         FROM
            ( VALUES 12.25, 1., 0.999
                   , 0, -0.001, -0.999, -1., -100406.009) AS test_data(d)
     ) TABLE_NAME
;
------------------------------------------------------------------------------

FEILD_NAME           RATHEESHNELLIKKAL               
-------------------- --------------------------------              
              12.250 12.250                          
               1.000 1.000                          
               0.999 0.999                           
               0.000 0.000                           
              -0.001 0.001
              -0.999 0.999
              -1.000 -1.000                          
         -100406.009 -100406.009                     

  7 record(s) selected.
Reply With Quote