Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
Hi Saumya,
I'd suggest using the Exists clause.
So, for example
tableB:
LOAD ID,
field2,
etc...
WHERE Exists(ID)
FROM....;
Marcus
Try something like this:
tableA:
LOAD ID
FROM....;
tableB:
LOAD ID,
field3,
....
WHERE Exists(ID)
FROM....;
Drop table tableA;
Hi,
You can also try with Keep
tableA:
LOAD ID
FROM....;
tableB:
Left Keep(tableA)
LOAD ID,
field3,
....
FROM....;
hope it helps
Celambarasan
Please use inner join .
QVTable:
SQL SELECT * FROM table1;
inner join SQL SELECT * FROM table2;
Try this
Like
TableA:
ID,
Field1,
Field2
from TableA;
Inner Join
Load ID,
Field3,
Field4
from TableB;
hope it helps