Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewalex
Contributor III
Contributor III

Load if not equal

Hello,

I have a problem with my Skripting.

I join two Tables to one.

But I want only the elements, where the [Object-ID] is not included in Table1


Aufgaben:

LOAD [Object-ID],

     a,

b

FROM

[..\10_Data\test.xlsx]

(ooxml, embedded labels, table is Aufgaben);

join load distinct

[Object-ID],

   a,

b

FROM

[..\30_QVDs\Aufgaben.qvd] where ...............

(qvd);

I hope someone can help me.


Alex

1 Solution

Accepted Solutions
avinashelite

Try this script it will work

Aufgaben:

LOAD [Object-ID],

     a,

b

FROM

Table1

(ooxml, embedded labels, table is Aufgaben);

[Object-ID],

   a,

b

FROM

table2

where not exists([Object-ID];

View solution in original post

10 Replies
oknotsen
Master III
Master III

Add this line of code:

where not exists([Object-ID]

to the 2nd load statement.

So the 2nd load statement turns into this:

join load distinct

[Object-ID],

   a,

b

FROM

[..\30_QVDs\Aufgaben.qvd]

where not exists([Object-ID]

(qvd);

May you live in interesting times!
qlikviewalex
Contributor III
Contributor III
Author

Unfortunately it does not work:

Script Error:


Error opening file '..\30_QVDs\Aufgaben.qvd where not exists  [Object-ID' The system cannot find the file specified.

join load distinct

[Object-ID],

    a,

b

FROM

[..\30_QVDs\Aufgaben.qvd] where not exists  [Object-ID]

(qvd);


Digvijay_Singh

Are you sure you need join, all your field names in both the tables are same, you may want to use concatenate.

susovan
Partner - Specialist
Partner - Specialist

Hi,

You can also try this script,

Table1:

LOAD [Object-ID],

     a,

b

FROM

[..\10_Data\test.xlsx]

(ooxml, embedded labels, table is Aufgaben);

Concatenate

Table2:

LOAD [Object-ID],

   a,

b

FROM

[..\30_QVDs\Aufgaben.qvd] where ...............

(qvd);

Warm Regards,
Susovan
avinashelite

Try like this

Aufgaben:

LOAD [Object-ID],

     a,

b

FROM

[..\10_Data\test.xlsx]

(ooxml, embedded labels, table is Aufgaben);

[Object-ID],

   a,

b

FROM

[..\30_QVDs\Aufgaben.qvd]

where not exists([Object-ID];


// since both the tables have similar columns it will automatically gets concatenated

qlikviewalex
Contributor III
Contributor III
Author

Thanks. You are all right. But my problem is not to connect the two tables.

I like only the elements where the Object-ID is NOT in the first Table.

Example:

Table1

Object-IDab

1

aa
2bb
3cc
4dd
5ee

Table2

Object-IDab
2xy
7gg
1attt

the result should look like this:


Object-IDab

1

aa
2bb
3cc
4dd
5ee
7gg


oknotsen
Master III
Master III

join load distinct

[Object-ID],

   a,

b

FROM

[..\30_QVDs\Aufgaben.qvd]

(qvd)

where not exists([Object-ID])

;

May you live in interesting times!
avinashelite

Try this script it will work

Aufgaben:

LOAD [Object-ID],

     a,

b

FROM

Table1

(ooxml, embedded labels, table is Aufgaben);

[Object-ID],

   a,

b

FROM

table2

where not exists([Object-ID];

oknotsen
Master III
Master III

Question:

Do you want to JOIN or CONCATENATE?

May you live in interesting times!