# Merge with more complex condition

**URL:** <https://discourse.getdbt.com/t/merge-with-more-complex-condition/5342>\
**Category:** Help\
**Tags:** incremental\
**Created:** [November 14, 2022, 6:21am UTC](https://discourse.getdbt.com/t/merge-with-more-complex-condition/5342 "2022-11-14T06:21:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vadimlu](https://avatars.discourse-cdn.com/v4/letter/v/aca169/32.png) [@vadimlu](https://discourse.getdbt.com/u/vadimlu)\
**Post date:** [November 14, 2022, 6:21am UTC](https://discourse.getdbt.com/t/merge-with-more-complex-condition/5342/1 "2022-11-14T06:21:47Z")

</div>

Hi all, we doing migration from MSSQL to BigQuery.  
All our ETL processes convert to DBT. Now I meet a some issue how can I apply MERGE when some of conditions looks like:  
[  
…  
when matched and [col a] \<\> [col b]  
then update [col a] = [col b]  
…  
]  
I need to update rows only when matched and only when its not equals

Thanks
