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

joining two tables to get the changed value in the table

Hi everyone, I have two tables with same column name

Table 1:

Load * Inline [

A,

1,

2,

3,

4,

5,

6];

Table 2:

Load * Inline[

A,

1,

2,

3,

4,

5,

7];

I want a solution which returns me 7 as the answer.

I tried this

Load * from Table1;

right Join

load* from table2

where not exists(A);

but when i reload this script of mine , its reloading perfectly but not fetching 0 rows .

Thanking everyone in anticipation

11 Replies
Anonymous
Not applicable
Author

Hi swuehl,

My actual data  is some thing like this

GROUP_ID

GROUP1

GROUP1A

GROUP2

GROUP2A

GROUP3

GROUP4

GROUP5

GROUP17

THE SECOND TABLE

[GROUP ID *]

1

1A

2

2A

3

4

5

20

I HAVE USED MID(GROUP_ID,6) TO GET ONLY 1, 1A, 2, 2A,3,4,5 AND 17 AND THEN TRYING UR SCRIPT TO GET 20 AS MY ANSWER, BUT AFTER RELOADING THERE ARE 0 ROWS FETCHED.

Not applicable
Author

Hi try this , I am getting 17, 20 as result

Table_1:

load * inline [

GROUP_ID

GROUP1

GROUP1A

GROUP2

GROUP2A

GROUP3

GROUP4

GROUP5

GROUP17 ];

Table_1a:

load

mid(GROUP_ID,6) as GROP_ID

resident Table_1;

drop table Table_1;

Table_2:

NoConcatenate

load * inline [

G_ID

1

1A

2

2A

3

4

5

20 ];

TAB:

NoConcatenate

load GROP_ID as GROUP_ID_new resident Table_1a;

inner join

load G_ID as GROUP_ID_new resident Table_2;

tab1:

NoConcatenate

load * Resident Table_1a where not exists(GROUP_ID_new,GROP_ID);

drop table Table_1a;

tab2:

NoConcatenate

load * Resident Table_2 where not exists(GROUP_ID_new,G_ID);

drop table Table_2;

drop table TAB;