Hey all the sql experts out there...I am trying to pivot 2 fields using the IFS budget_period_amount1_cfv view (custom view created with one extra field). I keep getting an oracle error: ORA-00198: column ambiguously defined on the first line. It works fine when pivoting one field, but when adding another field in the same table (custom field), I get the error. Here is the statement:
select * from
(select account as "Account", account_desc as "Account Desc",
budget_period,amount,cf$_sp_actual_costs,budget_year as "Year", code_d as "Dept" from
budget_period_amount1_cfv where code_d like nvl(upper('&Dept'),'%')
and budget_year like nvl(upper('&Year'),'%') and budget_version = 2)
pivot(sum(amount),sum(cf$_sp_actual_costs) for budget_period in (1,2,3,4,5,6,7,8,9,10,11,12))
Any ideas on the problem?
Thanks!