Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add a column to a table

Hi !

I have a table : Table1 which contains many informations like ID, date, name ... and another one : Table2 which contains the ID and the weight.

I would like to add, for each ID of the first table, the weight.

I tried with this script but it creates new rows in table1 and i don't know why. I want to keep the same number of row in table 1.

INNER JOIN (Table1)

LOAD

           ID,

          weight

RESIDENT Table2;

Thank you for your help.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps you need to use the distinct keyword:

INNER JOIN (Table1)

LOAD DISTINCT

           ID,

          weight

RESIDENT Table2;


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
swuehl
MVP
MVP

Check if your second table shows several weight values per ID (maybe only for some of the IDs).

You probably should clean your data first then use a join or a MAPPING approach.

Gysbert_Wassenaar

Perhaps you need to use the distinct keyword:

INNER JOIN (Table1)

LOAD DISTINCT

           ID,

          weight

RESIDENT Table2;


talk is cheap, supply exceeds demand
er_mohit
Master II
Master II

see attached file

here

i think the valuein your name and date field having null for some ID

therfore it showing you