How to update the target table
Posted: Tue Mar 06, 2012 2:51 am
Hi all,
I want to update the target table ,But maybe the data in target table not exists . in the job i Want not to use the join or lookup and so on.
so before I update the data I need to judge if there is exists data which i want to update.
I write like this :
update dw1.ethan_ssa_sr set sde_dtrd=? where dtke_dkg_id =? and exists (select 1 from dw1.ethan_ssa_sr where dtke_dkg_id =? )
But as we know there are two columns in columns tab, and in the sql I use three .so there is a error message like :
[IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001
So anybody can help me out ? if you can do that pls write down the sql ,thanks !
I want to update the target table ,But maybe the data in target table not exists . in the job i Want not to use the join or lookup and so on.
so before I update the data I need to judge if there is exists data which i want to update.
I write like this :
update dw1.ethan_ssa_sr set sde_dtrd=? where dtke_dkg_id =? and exists (select 1 from dw1.ethan_ssa_sr where dtke_dkg_id =? )
But as we know there are two columns in columns tab, and in the sql I use three .so there is a error message like :
[IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001
So anybody can help me out ? if you can do that pls write down the sql ,thanks !