Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

MindaugasBacius
Valued Contributor II

Issue of loading the data

Assume that I do have two tables.

Table1:

IDAC
1AC
2AC
3AC

Table2:

IDAB
2AB
4AB
5AB

My task is to concatenate both tables with one option.

I have to remove all the IDs from Table2 that are the same in Table1.

I am looking for most efficient way to do that.

Thank you for your ideas!

1 Solution

Accepted Solutions
hrlinder
Honored Contributor

Re: Issue of loading the data

try to use exists:

Tab1:

load ID,

A,

C

Tab2:

load ID,

A,

B

from

where not exists (ID)

5 Replies
hrlinder
Honored Contributor

Re: Issue of loading the data

try to use exists:

Tab1:

load ID,

A,

C

Tab2:

load ID,

A,

B

from

where not exists (ID)

Re: Issue of loading the data

Something like this:

t:

load * From Table1;

     concatenate

load * From Table2 where not exists(ID);

- Marcus

trdandamudi
Honored Contributor

Re: Issue of loading the data

May be like below:

Table1:

Load * Inline [

ID,A,C

1,A,C

2,A,C

3,A,C

];

Concatenate

Table2:

Load * Inline [

ID,A,B

2,A,B

4,A,B

5,A,B

]

Where not Exists(ID);

MindaugasBacius
Valued Contributor II

Re: Issue of loading the data

LOAD ID

FROM

(ooxml, embedded labels, table is Sheet1);

Concatenate

Table2:

LOAD B as ID

FROM

(ooxml, embedded labels, table is Sheet2)

where not exists(ID);

Why do I get the error while renaming the fields?

Screenshot_1.jpg

Re: Issue of loading the data

Try this:

LOAD ID

FROM

(ooxml, embedded labels, table is Sheet1);

Concatenate

Table2:

LOAD B as ID

FROM

(ooxml, embedded labels, table is Sheet2)

Where not Exists(ID, B);

Community Browser