Hello,
We have a data source which is a Sequential file. All the fields in that file are defined as Varchar. But in the target (teradata) database couple of fields are defined as Decimal as they are some Quantity fields. Now if a blank value come from the source file the datastage job throws and error saying that "Can not convert "" to long type". We tried to change the blank values to NULL, but still it does not work out. Can anyone help on this, please.
Thanks in advance.
Converting Varchar to Decimal
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Check the Format tab of your Sequential File stage. If the "null representation" field is empty, "" ought to be translated to null. Also check the Columns grid in case the null representation has been overridden on a per-column basis - you will need to scroll right to find this setting.
Otherwise, include an "empty to null" transformation in your Transformer stage.
Otherwise, include an "empty to null" transformation in your Transformer stage.
Code: Select all
(If InLink.TheColumn = "" Then @NULL Else InLink.TheColumn)
Last edited by ray.wurlod on Fri Jun 23, 2006 3:49 am, edited 1 time in total.
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.