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

Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script.

Hi All,

Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script. Please correct the Script if any syntax error.

I am getting ERROR:"Table not found CONCATENATE LOAD * RESIDENT DIM_ADMIN_DATA"

DIM_USER_DATA:

LOAD

'USER' END AS ACCESS,

[EMP NAME] AS USERID,

[EMP NAME] AS PASSWORD,

EMP_KEY AS _EMP_KEY

FROM DIM_EMP_DATA.QVD (qvd);

DIM_ADMIN_DATA:

LOAD * INLINE

[

    ACCESS, USERID, PASSWORD, _EMP_KEY

    ADMIN,  ADMIN,  ADMIN,    *

];

Section Access;  /* Start section access script */

LOAD *

RESIDENT DIM_USER_DATA;

CONCATENATE

LOAD *

RESIDENT DIM_ADMIN_DATA;

Section Application; /* End section access script */

12 Replies
Not applicable

Re: Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script.

Hi,

QV implicitly concatenates the two tables as it has same columns. So it doesnot find the 2nd table.

Still if you want to do concatenate explicitly, try

DIM_USER_DATA:

LOAD

'USER' END AS ACCESS,

[EMP NAME] AS USERID,

[EMP NAME] AS PASSWORD,

EMP_KEY AS _EMP_KEY

FROM DIM_EMP_DATA.QVD (qvd);

NOCONCATENATE;

DIM_ADMIN_DATA:

LOAD * INLINE

[

    ACCESS, USERID, PASSWORD, _EMP_KEY

    ADMIN,  ADMIN,  ADMIN,    *

];

HTH

-Shruti

manojkulkarni
Valued Contributor II

Re: Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script.

Since DIM_ADMIN_DATA  & DIM_USER_DATA tables have same columns, data from DIM_ADMIN_DATA table is already concatenated with DIM_USER_DATA. So you will not find DIM_ADMIN_DATA table any more. Concatenate operation is not required at all in Section Access block.

Not applicable

Re: Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script.

hi

try this

if two table has same fieldname then qlikview automatically concatenate into one table.

so your Dim_Admin_Date merge in Dim_User_Date.

so when you load Dim_Adimen_Data by Resident load, then table not found error found.

for this try this

DIM_USER_DATA:

LOAD

'USER' END AS ACCESS,

[EMP NAME] AS USERID,

[EMP NAME] AS PASSWORD,

EMP_KEY AS _EMP_KEY

FROM DIM_EMP_DATA.QVD (qvd);

NoConcatenate

DIM_ADMIN_DATA:

LOAD * INLINE

[

    ACCESS, USERID, PASSWORD, _EMP_KEY

    ADMIN,  ADMIN,  ADMIN,    *

];

Section Access;  /* Start section access script */

LOAD *

RESIDENT DIM_USER_DATA;

CONCATENATE

LOAD *

RESIDENT DIM_ADMIN_DATA;

Section Application; /* End section access script */

  

Not applicable

Re: Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script.

Thanks Vishwaranjan Kumar.

Now It is Clear for me.

Not applicable

Re: Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script.

Hi All,

After using Above Query, When I try to lon in with any Employee name It is keep asking USERID and after 3 attempt it is denied QVW file. Could you please suggest why it is happening.

If I log in with ADMIN user and password it is working expected and with ADMIN userID i am getting "$Syn 1 = ACCESS+USERID+PASSWORD+_SP_KEY" when reloading the data. I did not understand message "$Syn 1 = ACCESS+USERID+PASSWORD+_SP_KEY"

I used this query:

DIM_USER_DATA:

LOAD

'USER' END AS ACCESS,

[EMP NAME] AS USERID,

[EMP NAME] AS PASSWORD,

EMP_KEY AS _EMP_KEY

FROM DIM_EMP_DATA.QVD (qvd);

NoConcatenate

DIM_ADMIN_DATA:

LOAD * INLINE

[

    ACCESS, USERID, PASSWORD, _EMP_KEY

    ADMIN,  ADMIN,  ADMIN,    *

];

Section Access;  /* Start section access script */

LOAD *

RESIDENT DIM_USER_DATA;

CONCATENATE

LOAD *

RESIDENT DIM_ADMIN_DATA;

Section Application; /* End section access script */

Not applicable

Re: Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script.

hi

section access use for security on application and data.

in your case when you open the application the ask

UserId and

Password

bydefault it gives 3 chaces, if you write username or password three times wrong then access is denied for open application.

so write-

Userid = ADMIN

Password = ADMIN

Not applicable

Re: Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script.

My Question is If I enter an Employee name who is an user (as definided in below Query) and should see data belongs to him...

DIM_USER_DATA:

LOAD

'USER' END AS ACCESS,

[EMP NAME] AS USERID,

[EMP NAME] AS PASSWORD,

EMP_KEY AS _EMP_KEY

FROM DIM_EMP_DATA.QVD (qvd);

But it is not allowing to open the QVW file other than ADMIN User. why?

But Below query is working expected also for USER other than SHIVENDOO KUMAR and RAM KUMAR (These both are ADMIN as defined below.)

Section Access;  /* Start section access script */

LOAD

IF(MATCH([EMP NAME],'SHIVENDOO KUMAR','RAM KUMAR'),'ADMIN','USER') AS ACCESS,

[EMP NAME] AS USERID,

[EMP NAME] AS PASSWORD,

EMP_KEY AS _EMP_KEY

FROM DIM_EMP_DATA.QVD (qvd);

Section Application; /* End section access script */

Another Problem I have seen. Both these Tables DIM_USER_DATA and DIM_ADMIN_DATA are getting appeared in Selection list. Actually I don't want to show then to end users So I tried adding SET HidePrefix = '_'; and _ before tables like _DIM_USER_DATA and _DIM_ADMIN_DATA but still these tables are getting displayed in selection list. I want to know how can I hide these tables?



manojkulkarni
Valued Contributor II

Re: Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script.

in your query what is 'USER'END indicates ? because Access Type will always either USER or ADMIN

DIM_USER_DATA:

LOAD

'USER' END AS ACCESS,

[EMP NAME] AS USERID,

[EMP NAME] AS PASSWORD,

EMP_KEY AS _EMP_KEY

FROM DIM_EMP_DATA.QVD (qvd);

Not applicable

Re: Need to Concatenate Data from 2 in memory table but throwing error Table not found. Please see below Script.

Hi Manoj,

Sorry. That is copy past mistake. I checked code and code is like below:

DIM_USER_DATA:

LOAD

'USER' AS ACCESS,

[EMP NAME] AS USERID,

[EMP NAME] AS PASSWORD,

EMP_KEY AS _EMP_KEY

FROM DIM_EMP_DATA.QVD (qvd);