Resolves #80952 and also fixes arbitrary rearrangements of pivoted columns (dropping, duplicating and reordering). The bug was caused because fields reordering in `ProjectExec` wrapping `PivotExec` ...
DECLARE @total_col VARCHAR(MAX) DECLARE @result NVARCHAR(MAX) SET @total_col='' SELECT @total_col = @total_col + QUOTENAME(item) + ',' FROM items SET @result=LEFT(@total_col, (LEN(@total_col)-1)) ...
Here’s something that will Blow Your Mind if you’re a Power Query/M fan. Did you know that there’s a way you can get query folding to work if you’re using a native SQL query on SQL Server or Postgres ...
I first came across the Value.NativeQuery() M function about six months ago, but it didn’t do anything useful then so I didn’t blog about it. I checked it again recently though and now it does ...