Formatting and PIVOT
rehael
Posts: 1 New member
Hi.
It looks like SQL formatting has some trouble when query uses PIVOT.
Original query:
Formatted (Default style)
Formatted (Collapsed style)
Questions
1. Why COUNT in PIVOT is not uppercased?
2. Why Collapsed does not indent nor collapse FOR…?
Thanks,
Marcin
It looks like SQL formatting has some trouble when query uses PIVOT.
Original query:
SEleCT 'Shots until passing out' as Shots, Fred, Kate, cOUnT(1) as Foo fROm (SelECT who, shot FRoM party) up PIvoT (coUNt(shot) fOR who In (Fred, Kate)) aS p
Formatted (Default style)
SELECT 'Shots until passing out' AS Shots,
Fred,
Kate,
COUNT(1) AS Foo
FROM
(SELECT who, shot FROM party) up
PIVOT
(
coUNt(shot)
FOR who IN (Fred, Kate)
) AS p
Formatted (Collapsed style)
SELECT 'Shots until passing out' AS Shots, Fred, Kate, COUNT(1) AS Foo
FROM(SELECT who, shot FROM party) up
PIVOT(coUNt(shot)
FOR who IN(Fred, Kate)) AS p
Questions
1. Why COUNT in PIVOT is not uppercased?
2. Why Collapsed does not indent nor collapse FOR…?
Thanks,
Marcin