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.

kevpickering
New Contributor III

QVD load ok in Section Application but not in Section Access. Strange behaviour

Hi,

I'm experiencing strange script errors when coding in Section Access.

Firstly, if I use this in Section Application..

Users_Table:

REPLACE

LOAD

     ACCESS,

     NTNAME,

     CCG AS LOGGEDIN_CCG

FROM

     [Users list.qvd] (qvd);

It loads ok in full and partial reload.

If I cut it from section application and paste into section access it fails in both full and partial reload with the log file stating 'general script error'.

If I modify the script in section access to a preceding load:

Users_Table:

REPLACE

LOAD

     ACCESS,

     NTNAME,

     CCG AS LOGGEDINCCG;

LOAD

     ACCESS,

     NTNAME,

     CCG

FROM

     [Users list.qvd] (qvd);

It will run in both full and partial reload.

If the source was from a worksheet, the script will run in both full and partial reload without the need for a preceding load but still aliasing the CCG field.

Comments welcome please. We're using Version10 SR6 64bit edition and being executed in developers desktop.

1 Solution

Accepted Solutions
s_kunte23
Contributor III

Re: QVD load ok in Section Application but not in Section Access. Strange behaviour

Hi,

try adding where 1 = 1 this will cause the qvd not being bulk loaded.

section access;

LOAD

     ACCESS,

     NTNAME,

     CCG AS LOGGEDIN_CCG

FROM

     [Users list.qvd] (qvd) where 1 =1;

section application;

This is a known issue for section access with qvd. Therefore your preceding load may work because it finally loads each record...

Best

Stefan

4 Replies
MVP & Luminary
MVP & Luminary

Re: QVD load ok in Section Application but not in Section Access. Strange behaviour

I think the reason is the replace-statement which conflicts with the logic from section access. Further you won't be have a real advantage from a preceeding load or other optimizations if you only loads a few users from a qvd (probably < 100k).

- Marcus

kevpickering
New Contributor III

Re: QVD load ok in Section Application but not in Section Access. Strange behaviour

Hi Marcus,

The only reason the preceding load is there is to get the command to actually execute. Without the preceding load I get a 'general script error' in the log and the script fails.

I know I've managed to overcome the problem by using preceding load, but I don't understand the strange behaviour of having to use a preceding load.

s_kunte23
Contributor III

Re: QVD load ok in Section Application but not in Section Access. Strange behaviour

Hi,

try adding where 1 = 1 this will cause the qvd not being bulk loaded.

section access;

LOAD

     ACCESS,

     NTNAME,

     CCG AS LOGGEDIN_CCG

FROM

     [Users list.qvd] (qvd) where 1 =1;

section application;

This is a known issue for section access with qvd. Therefore your preceding load may work because it finally loads each record...

Best

Stefan

kevpickering
New Contributor III

Re: QVD load ok in Section Application but not in Section Access. Strange behaviour

Yeah, not fully understanding why adding WHERE 1 = 1 works, but it does.

As it's a known issue (bug) then fair enough.

Strange, but part of my original testing involved a search filter of

SELECT

     ACCESS,

     NTNAME,

     CCG AS LOGGEDIN_CCG

WHERE

     DASHBOARDS LIKE '*PRESCRIBING*'

and that also failed with 'general script error'.

But amending it to

WHERE

          1 = 1

     AND

          DASHBOARDS LIKE '*PRESCRIBING*'

and this executes successfully.