Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I think you are getting error in second Load statement, because you are using an aggregation function(Sum) without using Group By.
Try this
Budget:
LOAD rowno() as BudgetID,
[FY MONTH] as [Fiscal Month],
[FY YEAR1],
TYPE,
VENDOR,
State1,
SUM(if(TYPE = 'budget',BUDGETREVENUE)) as BUDGET,
SUM(if(TYPE = 'forecast',BUDGETREVENUE)) as FORECAST
RESIDENT BudgetTemp
GROUP BY [FY MONTH][FY YEAR1],
TYPE,
VENDOR,
State1;
Hope this helps you.
Regards,
Jagan.
Hi,
I think you are getting error in second Load statement, because you are using an aggregation function(Sum) without using Group By.
Try this
Budget:
LOAD rowno() as BudgetID,
[FY MONTH] as [Fiscal Month],
[FY YEAR1],
TYPE,
VENDOR,
State1,
SUM(if(TYPE = 'budget',BUDGETREVENUE)) as BUDGET,
SUM(if(TYPE = 'forecast',BUDGETREVENUE)) as FORECAST
RESIDENT BudgetTemp
GROUP BY [FY MONTH][FY YEAR1],
TYPE,
VENDOR,
State1;
Hope this helps you.
Regards,
Jagan.
Hi Jagan,yes, you are right.thanks for your help.