Handling Null update sql
Posted: Mon Feb 07, 2005 8:49 pm
Hi
I am running a job which updates a table using the below sql. Sql is from "Generated sql" in the Oracle8i oci stage
Update table test a
set a.date1 =sysdate
where a.pk1=:1 and a.Pk2=:2
Paramters which are both composite primary key:
:1 has null value from the input stage(not always null but sometimes)
:2 has a numeric value
when i ran the job i see 1 row updates in the log but i see date is not updated in the table???.
I know why it is not updating. oracle returns 0 row when we use column=NULL
I am sure someone might have gone through this problem,Can you please tell me how update null using the datastage?
Thanks
Jay
I am running a job which updates a table using the below sql. Sql is from "Generated sql" in the Oracle8i oci stage
Update table test a
set a.date1 =sysdate
where a.pk1=:1 and a.Pk2=:2
Paramters which are both composite primary key:
:1 has null value from the input stage(not always null but sometimes)
:2 has a numeric value
when i ran the job i see 1 row updates in the log but i see date is not updated in the table???.
I know why it is not updating. oracle returns 0 row when we use column=NULL
I am sure someone might have gone through this problem,Can you please tell me how update null using the datastage?
Thanks
Jay