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: 
Not applicable

Table joins

Please can you help as I am new to joins within qlikview itself.

I think I need a left outer join ?

Table 1

Plant

Type

Processed Date

OrderNo

========================

Table 2

Plant

Concern

ID

OrderNo

I want all the data from table one but ONLY the data from table TWO where the depot plant orderno match

How do I join in load ?

1 Solution

Accepted Solutions
sunny_talwar

You still have used Outer Join in the script. Did you try Left Join as I recommended?

View solution in original post

9 Replies
sunny_talwar

If you need only those rows that match from Table 2, then you need a Left Join. May be something like this:

Table1:

LOAD Plant,

          Type,

          [Processed Date],

          Order No

FROM Source;

Left Join (Table1)

LOAD Plant,

          Concern,

          ID,

          OrderNo

FROM AnotherSource;

Not applicable
Author

Hi Sunny

I have just tried this and unfortunately I am a still getting order nos that are in

table 2 that are not in table 1.

I don't want to see these......

sunny_talwar

That cannot happen. Do you have the same casing for Plant and OrderNo (not ORDERNO and PLANT in one of the tables)?. Would be possible to share a sample which demonstrate it not working?

Not applicable
Author

Attachment added - I have since changed some headings........ but you will see what I mean

For example sales order 0050607425 I would not expect to see as this does not exist in the other table.

Thanks

sunny_talwar

You still have used Outer Join in the script. Did you try Left Join as I recommended?

Not applicable
Author

Hi Sunny

Sorry sent example before I save. Yes I tried your recommendation but then data drops out of the other table that I require......

sunny_talwar

Is it doing the opposite of what you wanted? Try Right Join if what I said before was true

Not applicable
Author

Thanks Sunny !

Got it now - I swapped the over and it works great!

sunny_talwar

Awesome