Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional support for the EXCEPT operator in the WHEN MATCHED clause #14

Open
jwk6 opened this issue Aug 14, 2020 · 2 comments
Open

Comments

@jwk6
Copy link

jwk6 commented Aug 14, 2020

Add optional support for the EXCEPT operator in the WHEN MATCHED clause, as described here:
http://www.made2mentor.com/2013/05/writing-t-sql-merge-statements-the-right-way/

For Example:
WHEN MATCHED AND EXISTS
(SELECT Source.Column1, Source.Column2
EXCEPT
SELECT Target.Column1, Target.Column2)

This will properly handle NULL values in both the source and target, and will be a little more clear and concise for the developer.

EXCEPT is supported in all currently supported versions of SQL Server, and in Azure SQL Database.
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/set-operators-except-and-intersect-transact-sql?view=sql-server-ver15

@NowinskiK
Copy link
Member

Interesting idea!

@NowinskiK NowinskiK added this to the ver.4.3 milestone Aug 14, 2020
@jwk6
Copy link
Author

jwk6 commented Jun 1, 2021

@NowinskiK I'm feeling the urge to do something again. Mind if I work on this one?

jwk6 pushed a commit to jwk6/SCD-Merge-Wizard that referenced this issue Jun 3, 2021
@NowinskiK NowinskiK modified the milestones: ver.4.3, ver.4.4 Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants