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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

join in load command

Hi,

I need to create the table below using the load in a table resident. please help me.


tab 1

| a | b      | c            |

| 1 | 201101 | 201101 |

| 5 | 201101 | 201102 |

| 4 | 201102 | 201102 |

tab2

| d      |

| 201101 |

| 201102 |

| 201103 |

I need...

result

tab c

| e      | sum            |

| 201101 |          1           |

| 201102 |  4    |

| 201103 |  0    |

select sum(tab1.a), tab2.d

from tab1, tab2

where tab1.b <= tab2.c or tab1.c is null

but i need in the resident table

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

The following script works for me to get the result you want.

Tab1:

load * Inline [

a,b,c

1,201101,201101

5,201101,201102

4,201102,201102

];

Tab2:

LOAD *, d as e;

LOAD * Inline [

d

201101

201102

201103

];

Left Join (Tab2) LOAD b as d, c as e,a Resident Tab1;

DROP Table Tab1;

DROP Field d From Tab2;

View solution in original post

2 Replies
nagaiank
Specialist III
Specialist III

The following script works for me to get the result you want.

Tab1:

load * Inline [

a,b,c

1,201101,201101

5,201101,201102

4,201102,201102

];

Tab2:

LOAD *, d as e;

LOAD * Inline [

d

201101

201102

201103

];

Left Join (Tab2) LOAD b as d, c as e,a Resident Tab1;

DROP Table Tab1;

DROP Field d From Tab2;

Not applicable
Author

The logic is great, thanks very much.