Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have these tables, that i want to filter by status, but Preceding Load does not work because of the left join I think. I have tried resident load but could not get that to work either. I want the table to only load Person_ID with the Status='Married' any tips?
Person:
LOAD
"Person_ID",
Name,
Age,
WorkID;
FROM "Test.st002".dbo.person
Left Join (Person)
LOAD
"Person_ID",
Status,
Gender,
FROM
Thx
May be this:
Person:
LOAD
"Person_ID",
Name,
Age,
WorkID;
FROM "Test.st002".dbo.person
Right Join (Person)
LOAD
"PersonID",
Status,
Gender,
FROM
Where Status = 'Married';
May be this:
Person:
LOAD
"Person_ID",
Name,
Age,
WorkID;
FROM "Test.st002".dbo.person
Right Join (Person)
LOAD
"PersonID",
Status,
Gender,
FROM
Where Status = 'Married';
It worked, thanks Sunny, can you explain why it worked with right join and not left join?
Since the goal is to remove the data from your left table based on whatever is available in your right table (think of it as the right table being the boss here) you would do right join. If in case you want to remove data from the table that is joined (right table) then you would do a left join (left table is the boss)
Like a charm, thx again.