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: 
beck_bakytbek
Master
Master

the best way to exclude the value by joining of tables

Hi Folks,

I have a question: there are 2 Tables

Tab_A

ID, Sales

A, 1

B, 2

D, 3

and

Tab_B

ID, Sales

A, 10

B, 12

C, 13

The expected output is:

Tab

ID, Sales

D,3



what is best way to exclude the values and still only D = 3

Thanks a lot

Beck

1 Solution

Accepted Solutions
its_anandrjs

If using sunny example i added Noconcatenate because table need to not concatenate

Tab_B:

LOAD ID

FROM Tab_B;

Noconcatenate

Tab_A:

LOAD ID,

    Sales

FROM Tab_A

Where not Exists(ID);


DROP Table Tab_B;

View solution in original post

11 Replies
sunny_talwar

Is this needed during loading of the data? May be this

Tab_B:

LOAD ID

FROM Tab_B;

Tab_A:

LOAD ID,

     Sales

FROM Tab_A

Where not Exists(ID);


DROP Table Tab_B;

its_anandrjs

Do you need only data for D Column.

mato32188
Specialist
Specialist

Hi Beck,

Tab_B:

Load ID, Sales

FROM xxx;

noconcatenate

Tab_A:

Load ID, Sales

FROM xxx

where not exists(ID);

drop table Tab_B;

BR

Martin

ECG line chart is the most important visualization in your life.
its_anandrjs

If using sunny example i added Noconcatenate because table need to not concatenate

Tab_B:

LOAD ID

FROM Tab_B;

Noconcatenate

Tab_A:

LOAD ID,

    Sales

FROM Tab_A

Where not Exists(ID);


DROP Table Tab_B;

sunny_talwar

But why is that needed its.anandrjs‌? My Tab_B only have ID and Tab_A have ID and Sales. They are not going to auto concatenate. I don't think there is a need for NoConcatenate here. Would you agree?

beck_bakytbek
Master
Master
Author

Sunny Thanks a  lot for your feedback and help

beck_bakytbek
Master
Master
Author

Martin Thanks a  lot for your feedback and help

beck_bakytbek
Master
Master
Author

Anand Thanks a  lot for your feedback and help

its_anandrjs

Because field names are same and they concatenated first, try below example and comment the Noconcatenate and rename the filed ID to some other name and see the result.

Tab_B:

LOAD * Inline

[

IDD, Sales

A, 10

B, 12

C, 13

];

//NoConcatenate

Tab_A:

LOAD * Inline

[

ID, Sales

A, 1

B, 2

D, 3

]Where not Exists(IDD,ID);

DROP Table Tab_B;