We found this interesting bug on Dedicated SQL Pool when working with British style language. If you use Dynamic SQL to change the language, then selects on the date fail with a conversion error, but prints work. Weird... An example repro is below DECLARE @sql nvarchar(4000) Declare @StartDate date=convert(date, getdate()) SET @sql = 'SET LANGUAGE … Continue reading Bug – Synapse SqlPool Language and dates
Category: TSQL
We do a lot of code reviews and the use of SELECT DISTINCT always comes up as its picked up by many of the static code analysis tools as a known scalability and performance risk. The common question is “Why should I avoid distinct” and “How can I avoid it” During a performance review we … Continue reading TSQL Best Practice – Avoid use of DISTINCT