HI,
I've been trying to Transpose some data and I think PIVOT is the best option after many other options I've tried.
Can someone tell me if I have PIVOT or not.
I've attached the details from the Help >> About info below.
Also, I've tried the below code and got this error?
"SELECT Failed, 3707 (Syntax error expected something like ',' between the word PIVOT and the '('"
This is a work PC & doesn't use a VM, it has Windows 7 SP1.
I noticed that the word PIVOT is Grey instead of Blue, but the errors I get don't exactly state that it doesn't understand what PIVOT is?
Could someone please advise?
Thanks
CREATE TABLE s1(yr INTEGER, mon VARCHAR (5), sales INTEGER); ----------------------------------------------------------- Table that is used to run the Pivot Function ------------------------------------------------------------ SELECT * FROM s1; yr mon sales ----- --- ----- 2001 Jan 100 2003 Jan 300 2002 Jan 150 2001 Feb 110 2003 Feb 310 2002 Feb 200 2001 Mar 120 2002 Mar 250 ---------------------------------------------------------- SELECT * FROM s1 PIVOT (SUM (sales) FOR mon in (SELECT mon FROM s2)) dt; ---------------------------------------------------------- Query output; yr 'Feb' 'Jan' 'Mar' ----------- ----------- ----------- ----------- 2001 110 100 120 2003 310 300 ? 2002 200 150 250 ---------------------------------------------------------
Solved! Go to Solution.
Thanks Waldar,
So it's the 'Database Version' that I should be checking.
Cheers Peter
I downloaded this version from the below site.
What should I download to be able to use the PIVOT function?
I can't see any database Versions to ensure I get the right one??