0

I have a database lookup step that is retrieving 3 fields from a SQL Server table. One of the fields is a decimal (8,6). When retrieved, the field values appear to be integers, losing all decimal places. I have spent several hours trying to resolve this issue and have found a reference to using an alter step to ensure the decimal places are available.

In the database lookup step I have tried different data types (number, string etc.) and I've followed this with a select values step, where I'm altering the field to a number field with decimal places. Nothing has worked, so any help with what I'm sure should be a simple problem to solve would be greatly appreciated. Apologies if the answer is obvious and I've missed it.

Nithyanandam G
  • 61
  • 1
  • 2
  • 6
  • How do you know the field does loose its decimals? I am asking this silly question because by a long lasting uncorrected bug a double always looses its decimal in a preview, but not when written in a file or table... – AlainD Aug 29 '18 at 13:00

1 Answers1

0

The Group By step has a similar issue when the Sum function is used, it uses a new mask that rounds up the number, thuough in the Group By case it is just a mask. I usually fix it using a Select Values step, altering the meta-data to Number, precision 2, format 0.00 and expliciting the decimal sign, like so: enter image description here Note that the decimal sign shown in the format does not alter the decimal sign to a dot, it's just a mask.

Cristian Curti
  • 1,004
  • 1
  • 7
  • 13