The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

How would I Join on multiple columns from multiple tables

Last post 09-18-2008, 9:51 AM by slipserve. 16 replies.
Page 2 of 2 (17 items)   < Previous 1 2
Sort Posts: Previous Next
  •  09-18-2008, 9:43 AM 11425 in reply to 11424

    Re: How would I Join on multiple columns from multiple tables

    We found some issues in complex expressions in the On() clause, can you not use the Where clause and get the same results? We are going to fix this of course but we just cut a release and there wont be one for a while yet.
    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  09-18-2008, 9:51 AM 11426 in reply to 11425

    Re: How would I Join on multiple columns from multiple tables

    Unfortunately, as a LeftJoin I don't believe I can use a where clause and get the same results; criteria in the where clause would filter out rows.

    I also tried to add a Where clause to the LeftJoin, e.g.   reportQuery.LeftJoin(visitQuery).On(...).Where(...) but ES silently ignored the Where clause.

    However, I just managed to implement a workaround for now by fixing the syntax with quotes:

    reportQuery.LeftJoin(visitQuery).On( reportQuery.PatientId == visitQuery.PatientId & visitQuery.VisitDate >= "'" + startDate.ToString() + "'" & visitQuery.VisitDate <= "'" + endDate.ToString() + "'");

    I'm really hoping the next maintenance release addresses this.  

    Thanks,

    Matt

Page 2 of 2 (17 items)   < Previous 1 2
View as RSS news feed in XML