0

I'm trying to extract some numbers with decimals but need to remove the decimal part. There's no fixed length on any of both sides.

I have already tried:

INT()
INTR()
ROUND()

Usually INT() should solve this but sometimes it doesn't return the correct number (for example, INT(3) returns 2).

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
bbbb
  • 43
  • 9

2 Answers2

0

Did you try the function TRUNC(number, [, decimal_places]) ?

EDIT

For the round precision you can see this link

Community
  • 1
  • 1
Till
  • 4,183
  • 3
  • 16
  • 18
  • Yeah I tried, but an error telling me that the function is not defined within the expression pops up. – bbbb Apr 08 '16 at 08:16
  • You could try : `ROUND(column_name * 1000000, 0)` like the link I updated. – Till Apr 08 '16 at 08:20
0

I ended up solving it on my own! ROUND didn't work and FLOOR was also undefined...

I ended up needing to use two INTs with a FORMAT in one of them.

Thank you anyway.

bbbb
  • 43
  • 9