Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

where cluase gives NULL's

Hi,

can anyone please tell me why i get NULL's for this script:

Table:

LOAD * INLINE [

    Id, Upgrade, Date

    123, Base, 1

    123, TTR, 1

    456, TTR, 3

];

TableBase:

LOAD Id, Date, Upgrade as [Basic Upgrade]

Resident Table

WHERE Upgrade='Base';

1 Solution

Accepted Solutions
mdmukramali
Specialist III
Specialist III

Dear,

You didn't drop the table.

your script should be like below.

Table:

LOAD * INLINE [

    Id, Upgrade, Date

    123, Base, 1

    123, TTR, 1

    456, TTR, 3

];

TableBase:

LOAD Id, Date, Upgrade as [Basic Upgrade]

Resident Table

WHERE Upgrade='Base';

DROP Table Table;


      



View solution in original post

3 Replies
mdmukramali
Specialist III
Specialist III

Dear,

You didn't drop the table.

your script should be like below.

Table:

LOAD * INLINE [

    Id, Upgrade, Date

    123, Base, 1

    123, TTR, 1

    456, TTR, 3

];

TableBase:

LOAD Id, Date, Upgrade as [Basic Upgrade]

Resident Table

WHERE Upgrade='Base';

DROP Table Table;


      



Not applicable
Author

your script is concatenated your table,your output table is like below

Id
Date
Basic Upgrade
1231Base
4563

because both table has same field except Basic Upgrade.

try to use following script

Table:

LOAD * INLINE [

    Id, Upgrade, Date

    123, Base, 1

    123, TTR, 1

    456, TTR, 3

];

noconcatenate    // it will separate the table fileds

TableBase:

LOAD Id, Date, Upgrade as [Basic Upgrade]

Resident Table

WHERE Upgrade='Base';

drop table Table;

Peter_Cammaert
Partner - Champion III
Partner - Champion III

The Table Viewer (Ctrl-T or icon on the right of the Design-toolbar) is your friend here.

  • As the others have suggested already, drop the first table at the end of your script
  • If your table viewer shows no more tables, that means that the second LOAD automagically concatenates to the table created in the first LOAD. Add a NOCONCATENATE prefix to the second LOAD.

Good luck,

Peter