Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a parent table call Budget; Reading budget table and creating two separate tables, Actuals and Forecast. Actual table got create with data and Forecast_temp table got create and loading data but it is not creating Forecast table. Did not receive errors and load script running fine. Is there any limitation in creating table from temp tables? i don't think so. right.
Budget:
Oracle_Proj_Num,
Project_Number,
Project_manager,
Jan Actual,
Feb Actual,
Mar Actual, Apr Actual, May Actual, Jun Actual, July Actual, Aug Actual,
Sep Forecast, Oct Forecast, Nov Forecast, Dec Forecast
From
select * from budget;
Actual_Temp:
CrossTable(Actual_Month, Actual_Amount)
LOAD Oracle_Proj_Num, "Jan 2014", "Feb 2014","Mar 2014","Apr 2014","May 2014","Jun 2014","Jul 2014","Aug 2014"
Resident Budget;
Actuals:
LOAD
Oracle_Proj_Num ,
Month(Date#(Actual_Month, 'MMM YYYY')) AS Act_Month,
Actual_Amount
resident Actual_Temp;
drop Table Actual_Temp;
Forecast_Temp:
CrossTable(Forecast_Month, Forecast_Amount)
LOAD Oracle_Proj_Num,"Sep 2014","Oct 2014", "Nov 2014", "Dec 2014"
Resident Budget;
Forecast:
LOAD
Oracle_Proj_Num,
Month(Date#(Forecast_Month, 'MMM YYYY')) AS Forecast_Month,
Forecast_Amount
Resident Forecast_Temp;
//DROP Table Forecast_Temp;
You can use "NoConcatenate" to prevent automatic concatenation, even if the differen tables have the same set of fields.
I guess the table is getting concatenated to some other table with similar type and number of fields.
Try below:
Forecast:
LOAD
Oracle_Proj_Num,
0 as dummy,
Month(Date#(Forecast_Month, 'MMM YYYY')) AS Forecast_Month,
Forecast_Amount
Resident Forecast_Temp;
You can use "NoConcatenate" to prevent automatic concatenation, even if the differen tables have the same set of fields.