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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using data of a table in a second table.

hello,
i am new in qlikview and i have a problem that i don't know how to sort out.

I have two table and i need use one information that is in the first table to use in the load of the second table.
It's important to say that I think that isn't a problema of merge of two tables, I need to do a calculation using a data loaded previously.

It's something like this:

table1:

Load

table1_field1,

table1_field2

Select field1,field2

from table1

table2:

Load

field1 + (table1_field1*2) as table2_field1,

table2_field2

Select field1,field2

from table2

This is possible to do in QlikView?

Thank's

5 Replies
Not applicable
Author

There is one question: how is Table1 related with Table2?

Not applicable
Author

The key of the Table1 is in the other tables of the cloud, including the Table2, but there is a field that is only in the Table1 and this field has a important information to show dates in the right timezone. Then, all the fields dates will need of this data
I thought do a join in the select, but I would need to do this in many tables too, repeting the same code.

Thank you!!!

Not applicable
Author

I don't understand what are you talking about timezones and nobody will, until you will provide a whole picture or a data sample. But according to your initial question, if you have a Key field for Table1 and Table2, your script will be something like this:

table1:
Load
Key as Key,
field1 as table1_field1,
field2 as table1_field2;
Select Key, field1, field2
from table1;

left join (table1)
Load
Key as Key,
field1 as temp_table2_field1,
field2 as table2_field2;
Select Key, field1, field2
from table2;

left join (table1)
load
Key,
temp_table2_field1 + (table1_field1*2) as table2_field1,
resident table1;

drop field temp_table2_field1;


Not applicable
Author

In this case, I will have only one table with all the fields of the table1 and the table2?

Thanks for your help!

syed_muzammil
Partner - Creator II
Partner - Creator II

Hi ,

Try using Resident Load.

table1:

Load

table1_field1,

table1_field2

Select field1,field2

from table1

table2:

Load

field1 + (table1_field1*2) as table2_field1,

table2_field2

Resident Table1;

Select field1,field2

from table2