Null handling flat file
Moderators: chulett, rschirm, roy
Null handling flat file
how do I handle null fields when I read a flat file?
When I read, discard the records.
thank you in advance
When I read, discard the records.
thank you in advance
Re: Null handling flat file
Use NullFieldValue='' under field properties in formattab of sequential file stage.
Thanks
G.K.K
Thanks
G.K.K
Re: Null handling flat file
You want them discarded or they are being discarded and you want to process them as nulls?mmanes wrote:When I read, discard the records.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 12
- Joined: Wed Jun 13, 2007 2:12 am
-
- Participant
- Posts: 134
- Joined: Tue Jun 15, 2010 2:10 am
- Location: Bangalore
0 (Zero) might actually be a valid value for a number field.There is no "NULL" in a file and it is empty that actually is populated in a file and hence NullFieldValue='' works fine in common.gaurav_shukla wrote:Use NullFieldvalue property of Sequential stage.
Decimal - NullFieldvalue=0
N.Srinivas
India.
India.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Text files don't have data types, they only have text. Technically, they can not have NULL. Therefore, all you have to do is to set the NullFieldValue property to the value that represents NULL in each field. And that's a business decision.
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.