I wrote a piece of SQL that had some new T-SQL syntax in it: IS DISTINCT FROM. This predicate checks if two expressions are equal taking NULL into account. I successfully ran the code on an Azure SQL Database. However, when I tried to deploy the code using an Azure Devops pipeline, it returned the following error:
Error SQL46010: Incorrect syntax near DISTINCT.
That’s weird, it didn’t error out in SSMS or in Visual Studio (SQL Server Data Tools). I opened SSDT and rebuild the project. No build errors.
I went to the pipeline in Azure Devops and triggered it again. It completed successfully. That’s even more weird. After some trial and error, I found the culprit. When you trigger a pipeline manually, you get the following dialog:
The agent specification had windows-2019 (it’s been a while since I created the pipeline) and I had changed it to windows-latest.
When taking the latest version of Windows (and probably a more recent version of MSBuild), the error doesn’t occur. Probably the 2019 version doesn’t know about IS DISTINCT FROM, as it was released in 2022.
Conclusion: make sure to use either the latest version, or a recent stable version.
At Saturday the 21st of February I'm presenting an introduction to dimensional modelling at dataMinds…
I'm not trying to start up a debate whether you should use tabs or spaces…
The Power BI Enhanced Report Format (PBIR) will soon become the default, and that's a…
Quite a long title for a short blog post :)While deploying a DACPAC (from a…
Yes, you're reading that right, we're going to download a report that cannot be downloaded.…
You can find all the session materials for the presentation "Indexing for Dummies" that was…