Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
london1980
Contributor III
Contributor III

Joining tables in "Edit Script"

Hi,

I've been doing some experiments and tried joining two tables in Edit Script section

---------------------------------------------

table_one:

LOAD @1 as customer_id,

    '496858702' as campaign

FROM

(txt, codepage is 1252, no labels, delimiter is '\t', no quotes, no eof);

table_two:

Outer join (table_one)

LOAD @1 as customer_id,

    '496858802' as campaign

FROM

(txt, codepage is 1252, no labels, delimiter is '\t', no quotes, no eof);

final_table:

LOAD

    customer_id,

    count(campaign) as num_times

Resident table_two

group by customer_id;

drop table table_one;

---------------------------------------

but getting an error that says;

Table not found

final_table:

    load

    customer_id,

    count(campaign) as num_times

Resident table_two

group by customer_id

-----------------------------------------------

Anyone can tell me where I'm going wrong?

Thanks

MT

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

final_table:

LOAD

    customer_id,

    count(campaign) as num_times

Resident table_two

group by customer_id;

Use Resident table_one...

you have joined table_two to table_one so table_two no more exists.

View solution in original post

3 Replies
MK_QSL
MVP
MVP

final_table:

LOAD

    customer_id,

    count(campaign) as num_times

Resident table_two

group by customer_id;

Use Resident table_one...

you have joined table_two to table_one so table_two no more exists.

View solution in original post

jonathandienst

table_two was not created, it was consumed by the join into table_one. So you should reference table_one for the results of the join.

Your join will behave like a concatenation because of the two different, hard coded, values of campaign. The count on the joined table will be the same as the counts on the original tables, one and two.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
london1980
Contributor III
Contributor III
Author

Thank you both!

MT