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