Page 1 of 1

handling null data in change capture stage

Posted: Wed Feb 06, 2008 3:03 am
by dnat
Hi,

I have a job where i am comparing an oracle table and a sequential file. I have a key column and 2 columns (change values) for which the change needs to be detected. I updated the table with the records in sequential file. So, i deally when i run the job for the second time, all the records should be considered as "copy" records.
But few of them came out as edit records. When i checked the change_code, this "edit" is happening only for records where one of the "change_Values"(i.e columns where there is a change should be detected) is null.
The columns are null in the table as well as the file. But they are considered as "Edit"
Is there any way where we can handle this null issue.

Re: handling null data in change capture stage

Posted: Wed Feb 06, 2008 3:13 am
by Suman
dnat wrote:Hi,

I have a job where i am comparing an oracle table and a sequential file. I have a key column and 2 columns (change values) for which the change needs to be detected. I updated the table with the records in sequential file. So, i deally when i run the job for the second time, all the records should be considered as "copy" records.
But few of them came out as edit records. When i checked the change_code, this "edit" is happening only for records where one of the "change_Values"(i.e columns where there is a change should be detected) is null.
The columns are null in the table as well as the file. But they are considered as "Edit"
Is there any way where we can handle this null issue.

You can change the null values in the file to some default value and also in the oracle table use the NVL function to convert to same default value you are using in file. Then compare.

Suman

Posted: Wed Feb 06, 2008 4:34 pm
by manishk
You can use NulltoEmpty() function also and then compare . I should work.

Posted: Thu Feb 07, 2008 7:38 am
by dnat
Thanks. i assigned some default values to null and it worked.