Hi,
I'm attempting to import a field containing commas as well as decimals within the number set .
i.e.
123,020.13
987,876.00
The field is defined as decimal, however it appears it does not like the commas. I recieve the following error:
Warning:
Sequential_File_0,0: Field "huon_prem" has import error and no default value; data: {8 , 8 1 6 . 0 0}, at offset: 43 [impexp\group_comp.C:5913]
Should I define different field types? search and remove comma's with transformer?
What do you think is my best approach?
Thanks,
Importing Decimal field with commas
Moderators: chulett, rschirm, roy
Importing Decimal field with commas
Adam Love
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard. :D
Read them as VarChar (or Char, if fixed width) and use a Convert() function in a Transformer stage to remove the commas. You can effect the data type conversion in the same expression.
Read them as VarChar (or Char, if fixed width) and use a Convert() function in a Transformer stage to remove the commas. You can effect the data type conversion in the same expression.
Code: Select all
StringToDecimal(Convert(",", "", InLink.TheNumber))
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Mike, can you be a bit more specific about where one can change the default decimal format in a parallel job? Are you perhaps referring to the NUMERIC category in an NLS locale?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.