Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

merge statement in Talend

Hi,

I need to apply the below merge statement using any of the Talend components.

Any one please suggest me?


merge into mdmgeo.t_zip_code zc
using (select a.zip_cde,
              a.zip_cde_x_crdnt,
              a.zip_cde_y_crdnt
         from mdmgeo.t_zip_code a,
              mdmstggeo.t_ssi_rcd_2_main b
        where current_date between a.zip_cde_strt_dte and a.zip_cde_end_dte
          and a.zip_cde = b.zip_cde                   

          and (a.zip_cde_x_crdnt != b.picad_north_nbr
           or  a.zip_cde_y_crdnt != b.picad_west_nbr)) us on (zc.zip_cde = us.zip_cde) when matched then update
         set zip_cde_x_crdnt = us.zip_cde_x_crdnt,zip_cde_y_crdnt = us.zip_cde_y_crdnt

Thanks,

Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hi,
where do you input source come from? Have you checked component tMap to see if it is what you are looking for?

Best regards
Sabrina
Anonymous
Not applicable
Author

My input is oracle tables and no I haven't checked tmap component.
Can we implement merge statement as below in the tmap or in any other component.


merge into mdmgeo.t_zip_code zc
using (select a.zip_cde,
              a.zip_cde_x_crdnt,
              a.zip_cde_y_crdnt
         from mdmgeo.t_zip_code a,
              mdmstggeo.t_ssi_rcd_2_main b
        where current_date between a.zip_cde_strt_dte and a.zip_cde_end_dte
          and a.zip_cde = b.zip_cde                   
          and (a.zip_cde_x_crdnt != b.picad_north_nbr
           or  a.zip_cde_y_crdnt != b.picad_west_nbr)) us on (zc.zip_cde = us.zip_cde) when matched then update
         set zip_cde_x_crdnt = us.zip_cde_x_crdnt,zip_cde_y_crdnt = us.zip_cde_y_crdnt


Thanks!