I want to unpivot some data that resides in an oracle database table. I am using a passthrough query in access and I am trying to use the unpivot operator but I can't seem to get it to work. Here is a sample of my query.
I keep getting the error message
"SQL Command not properly ended.
Can someone help?
Thanks
Here is the code below.
Code:
select
gldata.company,tblunpvt.Amounts,tblunpvt.Period
from
(SELECT
COMPANY,DB_BEG_BAL as period1,DB_AMOUNT_01 as period2
FROM LAWSON.GLAMOUNTS) gldata
unpivot
(Amounts for Period in (period1,period2)) as tblunpvt