Skip to content
Advertisement

db2: how to remove the decimal from number column?

A very simple query which work

the result is

I want to remove the ,00000000000 to obtain

I have tried cast and round but without success. I’m on Db2

This nice ltrim works fine for all type of cars

but using with avg return the string with the 00000

the result is..

🙁 Only the , is changed.

Advertisement

Answer

casting this value should just work:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement