Shop Talk: 2024-01-15

The Recording

The Panelists

  • Kevin Feasel

Notes: Questions and Topics

Hugo Kornelis on MERGE

The main topic of the night was reviewing a great blog post by Hugo Kornelis on the current status of the MERGE operator in T-SQL. Hugo builds this on top of work that Aaron Bertrand pioneered and Michael J. Swart walked through a couple years back.

I have no problem with any of Hugo’s conclusions and appreciate the level of effort he went through. In fact, after reading the blog post, I’ve changed my mind on MERGE. Early on, I was gung-ho about it because I knew about Oracle’s UPSERT and wanted an equivalent for SQL Server. But once all the bugs and horror stories came out about MERGE, I stopped using it altogether. Now, it’s good to know that most of the problems have been fixed. There are still some cases in which you don’t want to use MERGE and Hugo highlights those instances, but for the rest of the time, it’s just as safe as having separate operations for insert, update, and delete operations.

F# and the CLR

Our other topic was around a ticket I’ve been watching for a few years to support F# in the SQL Server CLR. I got a rush of excitement when it was closed as fixed, but after a bit of confusion, the ticket was re-opened and it’s still awaiting work. Hopefully this will make its way out to the world someday. It would have been a great addition 15 years ago, when the CLR was still novel, as F# is an excellent language for the small types of functions that work well as CLR functions. But still, better late than never.

Leave a Reply

Your email address will not be published. Required fields are marked *