Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
saumyashah90
Specialist
Specialist

Load Script problem

I have two table,table A and table B

table A has one field called ID,and many other fields.

table B also has a field called ID

Now i want to load data from table B whose ID are equal to ID's of table A.

This is because table B has loads of data and i want only those whose ID matched with ID in table .
How should i do it?

5 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III


Hi Saumya,

I'd suggest using the Exists clause.

So, for example

tableB:

LOAD ID,

     field2,

     etc...

WHERE Exists(ID)

FROM....;

Marcus

tresesco
MVP
MVP

Try something like this:

tableA:

LOAD ID

FROM....;

tableB:

LOAD ID,

     field3,

     ....

WHERE Exists(ID)

FROM....;

Drop table tableA; 

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

You can also try with Keep

tableA:

LOAD ID

FROM....;

tableB:

Left Keep(tableA)

LOAD ID,

     field3,

     ....

FROM....;


hope it helps

Celambarasan

suniljain
Master
Master

Please use inner join .

QVTable:

SQL SELECT * FROM table1;

inner join SQL SELECT * FROM table2;

er_mohit
Master II
Master II

Try this

Like

TableA:

ID,

Field1,

Field2

from TableA;

Inner Join

Load ID,

Field3,

Field4

from TableB;

hope it helps