This project is read-only.

left outer join

Aug 18, 2010 at 1:49 PM
Edited Aug 18, 2010 at 3:23 PM

Without using a stored procedure or view can I mimic a left outer join in a RunSelect statement or some other way.

For instance:

Select LastName from tblPerson left outer join tblPerson on tblPerson.PersonId = tblCars.PersonId

I tried the following in a run select:

person.runselect(function(x) x.CarEntity is nothing | x.CarEntity.Make = "Mazda") but I SqlException error on the statement execution in the generated.cs class for this object.


Aug 18, 2010 at 3:41 PM
I am not sure that you can. However I notice that you are using VB which evaluates the entire expression, I think. Maybe it is blowing up on the OR statement in that the right side addresses an object "CarEntity" that does not exist if the left side is true. I think you can use the OrElse syntax to break evaluation on the first true statement. Without seeing the actual error, I was thinking this might be the issue.
Aug 18, 2010 at 3:44 PM

Sorry the DAL is in C# and our site is in VB so I got the syntax messed up when I wrote my comment above but either way it looks like this is not possible.  I just needed someone to clarify that for me before I moved on.  Thanks