Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Seemingly simple left join returns general script error

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.

1 Solution

Accepted Solutions

Re: Seemingly simple left join returns general script error

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.

7 Replies
MVP
MVP

Re: Seemingly simple left join returns general script error

Could you upload a QVW and your input excel file? Or the script with the inline code that showed the same issue?

Not applicable

Re: Seemingly simple left join returns general script error

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

Re: Seemingly simple left join returns general script error

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.

Re: Seemingly simple left join returns general script error

Run with this statement at the end and see if that helps:

DROP Table COGS_Cost;

Not applicable

Re: Seemingly simple left join returns general script error

I still get the error, with or without the DROP Table added at the end. See the atatched log.

Re: Seemingly simple left join returns general script error

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.

Not applicable

Re: Seemingly simple left join returns general script 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!