Skip to Content
0

Trimming Zeros after the decimal

Jul 05, 2017 at 07:27 PM

45

avatar image
Former Member

Hi All,

I have a requirement to trim zeros after the decimal and should round the value as well

can anyone help me in that

Thanks in Advance

for eg, i have a column like

Date_units

123.00

234.13

4567.85

9876.13

The output needs to be

Date_units

123

234.1

4567.9

9876.1

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Dirk Venken
Jul 06, 2017 at 09:52 AM
0

replace_substr(to_char(round(Date_units, 1),'99999990D.0'), '.0', '')

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Dirk,

Thanks for your reply.

I would like to do this in BODS,will it works...

any suggestion please

0

Sure, that's what you've got to put in the mapping in a Query transform. I thought that would have been clear :).

0