Re: SAPDB DECODE statement problem

Sven Koehler <[email protected]> Tue, 26 Aug 2003 21:28:39 +0200
Newsgroups gmane.comp.db.sapdb.general
Message-ID <[email protected]>
> I have been having a problem using the DECODE statement in SQL.  It 
> seems that when I use the decode statement on a floating-point column, 
> it truncates the result.  I cannot figure out a way around this.  An 
> example SQL statement is:
> 
> SELECT DECODE(T.COL1, null, 0, T.COL1) NEW_COL
> FROM TABLEA T;

Have you already tried
   DECODE(t.col1, null, 0.0, t.col1)
or to cast the 0 into a float?