| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Pivot in Oracle SQL
Hello!
In MS SQLServer I can use the keywords TRANSFORM and PIVOT. How do I get the corresponding functionality in Oracle SQL ?
Ex.
TABLE Winecellar:
Wine Type """"""""""""""" """""""" Snake Wine Half dry Franco Blanc Dry Sweet Snake Sweet Belle Madame Dry California Sun Dry
VIEW Type:
TRANSFORM Sum(1) AS iValue
SELECT Winecellar.Wine
FROM Winecellar
GROUP BY Winecellar.Wine
PIVOT Winecellar.[Type];
displays:
Wine Dry Half dry Sweet """""""""""""" """""""""""""" """""""""""""" """""""""""""" Belle Madame 1 California Sun 1 Franco Blanc 1 Snake Wine 1 Sweet Snake 1
If the number of winetypes is constant then there's no problem, but if they aren't...
In need of help!
David Received on Tue May 26 1998 - 06:49:12 CDT
![]() |
![]() |