I have a datastage job that reads data from a Sybase table (CHAR Columns) and loads to a Oracle table (CHAR) Fields.
There are a few rows which had only spaces as the column values and this data needs to be loaded to the oracle tables as spaces.
My job has APT_STRING_PADCHAR=0x20 set and also I tried using NULLtoEmpty / NULLtoValue with ' ' as the value but nothing seems to work.
The job aborts with the error
The statement failed with status 1400: ORA-01400: cannot insert NULL
I tried the If (Trim(column)) = '' then ' ' - Even then the job aborts with the same error. But if I use this in the constraint of a transformer and write records to a file with the above derivation, It identifies these records correctly - Please let me know if am missing something during the conversion
You'd have to disable that option when you did the conventional inserts for a true test... and fairly certain you'll find conventionals work fine without that setting.
-craig
"You can never have too many knives" -- Logan Nine Fingers
I tried using conventional load with the option set to 'No' and it either aborted (NULL Constraint) or sent these records to the reject file when I rejected the SQL constraint violation records .
But when I changed it to 'Yes' it loaded the data.