Page 1 of 1

Update then Insert : Insert not Working in ODBC Enterpeise

Posted: Tue Feb 27, 2007 3:26 pm
by swades
Hi,

I am doing Upsert: Update then Insert to DB2 Table using ODBC Enterprise Stage. I am using Userdefined query.

Update working fine but Insert is not working. In log No Error Massage,No warning.

Only insert AND only update works fine with same query

If any one come across this type of issue then please advise to resolve this.

Thanks.

Posted: Tue Feb 27, 2007 3:57 pm
by us1aslam1us
If Insert and update are working fine then why not work with them instead of upsert. I guess both will give you same result. Something like this :

Code: Select all

 
                           
                             insert 
                           ---------> 
   -->    Transformer stage          ODBC Enterprise stage 
                           ---------> 
                            update

Posted: Tue Feb 27, 2007 4:43 pm
by swades
Thanks for reply

But In DS 7.5.2 EE : cant have 2 input links towards a single ODBC Enterprise Stage.

Thanks

Posted: Tue Feb 27, 2007 7:38 pm
by ray.wurlod
No problem. Use two ODBC Enterprise stages, one on each link.

Posted: Wed Feb 28, 2007 12:33 am
by swades
Thanks

But how can I assure that It will do 1st Update and then Insert. I tried by giving link order but somtimes that is not working.

Thanks

Posted: Wed Feb 28, 2007 1:08 am
by novneet
Why don't u use the DB2 enterprise stage.

Posted: Wed Feb 28, 2007 1:22 am
by DSguru2B
You can make sure of that via link ordering. But that will only happen for a 'per row' basis. If you want all inserts first and then all updates or vice versa for that matter, do it in seperate jobs.