Bug in unpivot formatting fully qualified ?
Posted: Mon 15 Apr 2013 12:52
Formatting unpivot code below (which is correct T-SQL) results in failure "Error (6,21): '')'' expected"
Reason seems to be the alias SRC in SRC.[1]
Removing the alias (code below) and formatting is done without an error.
Code: Select all
with SRC as
( select [1] = 1 )
select U.*
from SRC
unpivot
(Val for Col in (SRC.[1])) as U
Removing the alias (code below) and formatting is done without an error.
Code: Select all
with SRC as
( select [1] = 1 )
select U.*
from SRC
unpivot
(Val for Col in ([1])) as U