Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading table with a field content from another loaded table-help please

Hello!

I was searching for a solution in my problem and I could't find anything...

I have 2 tables:

tab1:

load

A,B,C

1,100,x

2,101,x1

3,102,x2

from table1.qvd;

tab2:

load
A,D,F

1,200,y1

2,201,y2

3,202,y3

4,203,y4

5,204,y5

6,205,y6

from table2.qvd;

Ok. So, after I load the first table, I would like the second table to be loaded only with the values for A field that are in tab1.

Something like:

load A where A=tab1(A) , D, F

........

I was looking for this solution because I have to load a very large amount of data, and I need this condition, that might be preaty simple...

Thank you a lot!

Silv

1 Solution

Accepted Solutions
swuehl
MVP
MVP

try

tab1:

load

A,B,C

1,100,x

2,101,x1

3,102,x2

from table1.qvd;

tab2:

load
A,D,F

1,200,y1

2,201,y2

3,202,y3

4,203,y4

5,204,y5

6,205,y6

from table2.qvd where exists (A);

View solution in original post

6 Replies
Not applicable
Author

Is there a function that can be used...something like RESIDENT tab1 ...but I don't know how to inprove it in my code...

If I use joins, it creates me only one table, but I would like to have the first table in the initial load format, and the second one to be loaded only for A field values that are in tab1.

Anyone can give me a hint?...

swuehl
MVP
MVP

try

tab1:

load

A,B,C

1,100,x

2,101,x1

3,102,x2

from table1.qvd;

tab2:

load
A,D,F

1,200,y1

2,201,y2

3,202,y3

4,203,y4

5,204,y5

6,205,y6

from table2.qvd where exists (A);

Not applicable
Author

Thank you very much swuehl.

This solved my problem.

I thought I had to use RESIDENT table, and my search was in that way...never think for this solution:))

Thx again!

Not applicable
Author

Sorry for this reply, but i handle another error in executing the script.

tab1:

load

A,B,C

1,100,x

2,101,x1

3,102,x2

from table1.qvd;

tab2:

load
X as A,D,F

1,200,y1

2,201,y2

3,202,y3

4,203,y4

5,204,y5

6,205,y6

from table2.qvd where exists(A) ; - error "field A not found"

swuehl
MVP
MVP

try

...

where exists(A,X);

Not applicable
Author

solved.

Thank you!