Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
curiousfellow
Specialist
Specialist

left join adds row ?

I want to add a field from table B to table A

My script :

Left join (tableA)

load tableB.value as newfield

Resident tableB where tableB.value > 0;

drop table B;

Original there is one row in table A, after performing the script I have two rows (same values).

In table B there is only one row (per key) that meets the condition > 0.

I cannot understand why I get two rows.

Although table A is build out of various other tables, using resident and drop table there are no other tables .

Unfortunately I cannot add an example because of privacy issues.

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

Especially if there is only one field and always if there any problems with the number of records is mapping more suitable then a join: Don't join - use Applymap instead.

- Marcus

View solution in original post

4 Replies
Anonymous
Not applicable

Hello,

Yes, it's because you renamed the field to newfield. That's why you're having 2 exact same columns with different names.

If you want more help you could try building up an example and trying to explain what exacly you want to accomplish.

Best of luck

marcus_sommer

Especially if there is only one field and always if there any problems with the number of records is mapping more suitable then a join: Don't join - use Applymap instead.

- Marcus

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Make it as marcus_sommer suggests.


There is the sample:

map_table:

mapping Load *

Inline [

ID, Supplier NEW

1, A

2, B

3, C

]

Where ID > 2;

Table:

Load *,

  ApplyMap('map_table', ID, ':') as [Supplier New]

Inline [

ID, Supplier

1, A

2, B

3, C

];

And there is how it looks after the reload:

Screenshot_3.jpg

PrashantSangle

Hi,

I don't think so.

can you post entire script as well as if possible qvw or screen shot which gives issue.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂