Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My colleague developed a dashboard in QlikView and on his and other colleagues pc it loads fine without issues, they have version 11 and 32bit pc, however i have a 64bit pc and i have version 12 of QlikView but when i load the same script it comes up with "Field 'a' not found".
I've looked into it and it has got a lot of and/or statements, on mine the syntax highlighter for and/or stops at a certain point and it fails if any and/or goes past this. However if i load with the data up to the point it stops highlighting it works.
The thing i'm struggling to understand is that the same QVW is being used and it works on 3 of my colleagues pc with version 11, however on mine its not.
Please help
Thanks
Vinesh
Found the resolution!!!!
For some reason breaking the WHERE clause into brackets helped it work!! 🙂
For example:
WHERE
[Occupation Code] = 'H2H' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S1C' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S1E' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S9C' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'N6H' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'H1F' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'NFH' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'N6H' and
[Org Cost Centre] = '313J785'
In QV12 it would bring up an error of "Field 'a' not found", however once the brackets have been added this works - see below:
([Occupation Code] = 'H2H' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S1C' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S1E' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S9C' and
[Org Cost Centre] = '3133410') or
([Occupation Code] = 'N6H' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'H1F' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'NFH' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'N6H' and
[Org Cost Centre] = '313J785')
Found the resolution!!!!
For some reason breaking the WHERE clause into brackets helped it work!! 🙂
For example:
WHERE
[Occupation Code] = 'H2H' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S1C' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S1E' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S9C' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'N6H' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'H1F' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'NFH' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'N6H' and
[Org Cost Centre] = '313J785'
In QV12 it would bring up an error of "Field 'a' not found", however once the brackets have been added this works - see below:
([Occupation Code] = 'H2H' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S1C' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S1E' and
[Org Cost Centre] = '3133410' or
[Occupation Code] = 'S9C' and
[Org Cost Centre] = '3133410') or
([Occupation Code] = 'N6H' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'H1F' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'NFH' and
[Org Cost Centre] = '313J785' or
[Occupation Code] = 'N6H' and
[Org Cost Centre] = '313J785')
I could not replicate your error in QV12 for a small data set.
Data: LOAD [Occupation Code], [Org Cost Centre], Ceil(Rand()*10) as Amount Inline [ Occupation Code, Org Cost Centre H2H, 3133410 S1C, 3133410 S1E, 3133410 N6H, 3133410 N6H, 313J785 NFH, 0 NFH, 313J785 NFH, 313J786 NGH, 313J787 ]; QUALIFY *; Data2: LOAD * Resident Data WHERE [Occupation Code] = 'H2H' and [Org Cost Centre] = '3133410' or [Occupation Code] = 'S1C' and [Org Cost Centre] = '3133410' or [Occupation Code] = 'S1E' and [Org Cost Centre] = '3133410' or [Occupation Code] = 'S9C' and [Org Cost Centre] = '3133410' or [Occupation Code] = 'N6H' and [Org Cost Centre] = '313J785' or [Occupation Code] = 'H1F' and [Org Cost Centre] = '313J785' or [Occupation Code] = 'NFH' and [Org Cost Centre] = '313J785' or [Occupation Code] = 'N6H' and [Org Cost Centre] = '313J785';
This ran without errors (November 2018 version)
Hi Jontydkpi,
This was a snippet of the code we had, our original one has approx 500 lines of these and or statements, when I tried it in my version it didn't work however when i put the brackets in like the example below it worked and loaded fine.
Thanks
Vinesh