This question is locked. New answers and comments are not allowed.
Is it possible to do a join with multiple conditions? I have tables with multiple columns as keys and although I've tried to to join with multiple conditions I failed. Below I show some of the ways I've tried and failed with exceptions...
Try 1
from a in table1
join b in table2 on new {a.code, a.aa} equals new {b.code, b.aa}
join c in table3 on b.id equals c.id
where ....
Try 2
from a in table1
from b in table2
from c in table 3
where a.code == b.code && a.aa == b.aa && b.id == c.id
...
Try 3
from a in table1
from d in ( from b in table2 join c in table3 on b.id equals c.id select new {t1 = b, t2 = c})
where a.code = d.t1.code && a.aa == d.t1.aa
...
Try 1
from a in table1
join b in table2 on new {a.code, a.aa} equals new {b.code, b.aa}
join c in table3 on b.id equals c.id
where ....
Try 2
from a in table1
from b in table2
from c in table 3
where a.code == b.code && a.aa == b.aa && b.id == c.id
...
Try 3
from a in table1
from d in ( from b in table2 join c in table3 on b.id equals c.id select new {t1 = b, t2 = c})
where a.code = d.t1.code && a.aa == d.t1.aa
...