I have a similar problem where empty strings are getting loaded as blanks instead of loading them as NULLS in my target table.BODS is generating my mload script and this happens only with varchar columns.all other integer columns are getting loaded as NULLS where ever there were blanks in the source data.
Pls help me out as how to store the blanks as NULL using MLOAD..
You need NULLIF in MLoad's LAYOUT or in the INSERT command:
.FIELD C0_ * VARCHAR(20) NULLIF C0_ = '';
INSERT ... NULLIF(col, '')
Thanks a lot for your inputs..forgot to mention that this is happening through a TPT load..So is it the same that we need to do?
So we need to manually handle such cases whenever there are blanks in the source data( for varchar columns) and no other go other than this?