Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am loading data from 2 tabs of a spreadsheet, and then joining them in Qlikview. It seems like a reasonably simple task, but I just keep getting a General Script Error on reload. I tried doing the same with a basic inline load and had the same issue. What am I missing??
If I Exit Script just before the left join, it runs OK, and creates the 2 tables as expected.
COGS_Split_Temp:
CrossTable(Month, Data, 2)
LOAD [Line Type],
ItemType,
[1],
[2],
[3],
[4],
[5],
[6],
[7],
[8],
[9],
[10],
[11],
[12]
FROM
(ooxml, embedded labels, table is UnitSplit)
WHERE([Line Type] = 'Detail');
COGS_Split:
LOAD
num#(Month)&ItemType as Key,
Data as UnitSplit,
num#(Month) as Month,
ItemType
resident COGS_Split_Temp;
drop table COGS_Split_Temp;
/////////////////////////////
COGS_Split_Temp1:
CrossTable(Month1, Data, 2)
LOAD [Line Type],
ItemType,
[1],
[2],
[3],
[4],
[5],
[6],
[7],
[8],
[9],
[10],
[11],
[12]
FROM
(ooxml, embedded labels, table is UnitCost)
WHERE([Line Type] = 'Detail');
COGS_Cost:
LOAD
num#(Month1)&ItemType as Key,
Data as UnitCost
resident COGS_Split_Temp1;
drop table COGS_Split_Temp1;
left join (COGS_Split)
LOAD
Key,
UnitCost
resident COGS_Cost;
17/06/2015 9:37:38 AM: 0230 COGS_Cost:
17/06/2015 9:37:38 AM: 0231 LOAD
17/06/2015 9:37:38 AM: 0232 num#(Month1)&ItemType as Key,
17/06/2015 9:37:38 AM: 0233 Data as UnitCost
17/06/2015 9:37:38 AM: 0234 resident COGS_Split_Temp1
17/06/2015 9:37:38 AM: 2 fields found: Key, UnitCost, 24 lines fetched
17/06/2015 9:37:38 AM: 0236 drop table COGS_Split_Temp1
17/06/2015 9:37:38 AM: 0238 left join (COGS_Split)
17/06/2015 9:37:38 AM: 0239 LOAD
17/06/2015 9:37:38 AM: 0240 Key,
17/06/2015 9:37:38 AM: 0241 UnitCost
17/06/2015 9:37:38 AM: 0242 resident COGS_Cost
17/06/2015 9:37:38 AM: 2 fields found: Key, UnitCost, 24 lines fetched
17/06/2015 9:37:38 AM: Joining/Keeping
17/06/2015 9:37:38 AM: General Script Error
17/06/2015 9:37:38 AM: Execution Failed
17/06/2015 9:37:38 AM: Execution finished.
That is strange... I did not get it and not sure why it would give you an error when it won't give me an error.
Could you upload a QVW and your input excel file? Or the script with the inline code that showed the same issue?
Sure - I've cut down the model to just the load from Excel.
I also limited the data in Excel to just 2 'ItemTypes' - in reality there would be 100 or so.
Regards,
Derek
I did not get any execution error when I run the script without exit script. I got this instead:
16/06/2015 8:42:34 PM: 0137 | UnitCost |
16/06/2015 8:42:34 PM: 0138 resident COGS_Cost
16/06/2015 8:42:34 PM: | 2 fields found: Key, UnitCost, 24 lines fetched |
16/06/2015 8:42:34 PM: Joining/Keeping
16/06/2015 8:42:34 PM: $Syn 1 = Key+UnitCost
16/06/2015 8:42:34 PM: Execution finished.
Run with this statement at the end and see if that helps:
DROP Table COGS_Cost;
I still get the error, with or without the DROP Table added at the end. See the atatched log.
That is strange... I did not get it and not sure why it would give you an error when it won't give me an error.
OK, well I have just restarted my laptop and voila the problem has disappeared. I can only assume that there was some lock on a file, or cached info somewhere.
For reference, the Excel file and qvw is local on my machine, running version 11.20.12235.0 SR5.
Thanks both for your suggestions!
I had this problem. Closing all the opened qvds and opening a new QV instance resolved my issue. Assuming there must have been some lock on any of the file/qvd being used.