Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Below is my script, but I keep getting this error. I'm sure its something simple. Maybe Im missing a , ; or keyword.
I'm trying to Sort my Project field and have to join with the Master table below. Is there a more efficient way to aplha order this field?
Syntax error, missing/misplaced FROM:
temp1:
Load Project Order by Project
temp1:
Load Project Order by Project
temp1:
Load Project Order by Project; //Sorted project field for Master Join
SQL SELECT Project
FROM CorpReporting.MonthlyBacklogForecastMaster;
Join //Join Project field
ForecastMaster:
LOAD Autonumber(DataSetKey&'_'&Project) as %Key, // Composite Join Key to ForecastRev
DataSetKey,
Project,
BacklogType,
Description,
EndUserCat,
FundedAmt,
Gate,
ItdRevenue,
MonthsLeftInPoP,
PWin,
TotalBacklogAmt;
SQL SELECT
DataSetKey,
Project,
Description,
BacklogType,
ContractedAmt,
EndUserCat,
PWin,
Gate,
ItdRevenue,
MonthsLeftInPoP,
TotalBacklogAmt
FROM CorpReporting.MonthlyBacklogForecastMaster;
Gysbert,
I used the script form your post and this worked great, not sure why it uses a QVD vs a Resident load at the end ?
Temp1:
LOAD Project;
SQL SELECT Project
FROM CorpReporting.MonthlyBacklogForecastMaster;
Temp2:
NoConcatenate
Load Project Resident Temp1 Order by Project; //Sorted project field for Master Join
Store Temp2 into SortedProject.qvd;
Drop Table Temp1,Temp2;
ForecastMaster:
LOAD Project from SortedProject.qvd (qvd);
Join
LOAD
You can only use order by with resident loads, not with preceding loads. But you can simply let the sql database do the sorting for you:
ForecastMaster:
SQL SELECT Project
FROM WBB.CorpReporting.MonthlyBacklogForecastMaster
Order by Project;
join (ForecastMaster)
LOAD Autonumber(DataSetKey&'_'&Project) as %Key, // Composite Join Key to ForecastRev
DataSetKey,
Project,
...etc
edit: removed Temp table construction
Ah ok, makes sense now. I wish they would have mentioned that in this artcile.
Thanks!
http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load
Strange. no error but sorting did not occur?
Hi
Try like this
Join the tables first. Then "order by project".
Hope it helps
Gysbert,
I used the script form your post and this worked great, not sure why it uses a QVD vs a Resident load at the end ?
Temp1:
LOAD Project;
SQL SELECT Project
FROM CorpReporting.MonthlyBacklogForecastMaster;
Temp2:
NoConcatenate
Load Project Resident Temp1 Order by Project; //Sorted project field for Master Join
Store Temp2 into SortedProject.qvd;
Drop Table Temp1,Temp2;
ForecastMaster:
LOAD Project from SortedProject.qvd (qvd);
Join
LOAD