behaviour of NULLTOZERO against primarykey field
Posted: Tue Aug 19, 2008 11:01 pm
Hi all,
I had unusual behaviour when I used NULLTOZERO against the composite primary key, obiviously primary key field will not be NULL. But unfortunately I tested this function, it's returning only zero value, its not taking the value in that field.
for example
below are the four fields, in that Inlink.field1 Inlink.field2 are primary key fields
Inlink.field1 Inlink.field2 Inlink.field3 Inlink.field4
25488 0 like fruit
25488 2543 nike veg
expected result is
Outlink.field1 Outlink.field2 Outlink.field3 Outlink.field4
25488 0 like fruit
25488 2543 nike veg
But the result obtained is
Outlink.field1 Outlink.field2 Outlink.field3 Outlink.field4
25488 0 like fruit
when I removed that Nulltozero on Inlink.field2 I am getting two records in the oracle database
Outlink.field1 Outlink.field2 Outlink.field3 Outlink.field4
25488 0 like fruit
25488 2543 nike veg
I want to know this behaviour of NULLTOZERO against the primary key has anyone faced this type of problem?
I had unusual behaviour when I used NULLTOZERO against the composite primary key, obiviously primary key field will not be NULL. But unfortunately I tested this function, it's returning only zero value, its not taking the value in that field.
for example
below are the four fields, in that Inlink.field1 Inlink.field2 are primary key fields
Inlink.field1 Inlink.field2 Inlink.field3 Inlink.field4
25488 0 like fruit
25488 2543 nike veg
expected result is
Outlink.field1 Outlink.field2 Outlink.field3 Outlink.field4
25488 0 like fruit
25488 2543 nike veg
But the result obtained is
Outlink.field1 Outlink.field2 Outlink.field3 Outlink.field4
25488 0 like fruit
when I removed that Nulltozero on Inlink.field2 I am getting two records in the oracle database
Outlink.field1 Outlink.field2 Outlink.field3 Outlink.field4
25488 0 like fruit
25488 2543 nike veg
I want to know this behaviour of NULLTOZERO against the primary key has anyone faced this type of problem?