How Can I not have a warning incase a null value is being loaded from a fixed with sequential file to a db2 table ?
how can I get datastage to treat spaces as null ?
AdjBar..Transformer_6: At row 1, link "Output", while processing column "VERSION_NO"
Value treated as NULL
Attempt to convert String value " " to Long type unsuccessful
Warning "cannot convert null....
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you specify " " as the representation of NULL in this field, in the Columns grid, then " " will automatically be read as NULL, which IS valid as a Long, so the warning will disappear!
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.
I do the following to handle it
if trim(Arg1) ="" then @null else trim(Arg1)
Are you saying I have no other alternative but to validate every column ???
if trim(Arg1) ="" then @null else trim(Arg1)
Are you saying I have no other alternative but to validate every column ???
ray.wurlod wrote:If you specify " " as the representation of NULL in this field, in the Columns grid, then " " will automatically be read as NULL, which IS valid as a Long, so the warning will disappear! ...
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can set the default for all columns on the Format tab. However, the default of "" is probably better in most cases; where you want " " (that is, a space) to be the representation of NULL, I recommend doing this explicitly at the column level.
Incidentally, Trim(" ") returns " ", never "". You would need Convert() to eliminate all space characters.
Incidentally, Trim(" ") returns " ", never "". You would need Convert() to eliminate all space characters.
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.