I have one source field 'A' defined as nullable varchar(5).The target database field is defined as nullable char(2). Whenever null values are coming in source field some unknown character is getting inserted in target field.Target database is DB2.
Running ascii(A) function against the field(A) in the database,I am getting value 0,which is null.But when giving clause against the field as 'is null',this specific record is not being selected.
I have given conditions like "if isnull(a) then setnull() else trim(a)" in transformer.But still facing the same.
Any suggestion plz.
character field null issue
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The value is represented by Char(0) or UniChar(0). You can use either of these representations in functions such as Convert(). In particular, this value is not the same as NULL (even though it's referred to in ASCII as "NUL").
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.