outer (687)


c# - How do I most elegantly express left join with aggregate SQL as LINQ query

c# - How do I most elegantly express left join with aggregate SQL as LINQ query

SQL: SELECT u.id, u.name, isnull(MAX(h.dateCol), '1900-01-01') dateColWithDefault FROM universe u LEFT JOIN history h ON u.id=h.id AND h.dateCol<GETDATE()-1 GROUP BY u.Id, u.name…


C# loop-break vs. continue

In a C#(feel free to answer for other languages) loop, what's the difference between break and continue as a means to leave the structure of the loop, and go to the next iteration? Example: foreach(Da…



Java Coding standard/best practices-naming convention for break/continue labels

Sometimes a labeled break or continue can make code a lot more readable. OUTERLOOP: for(;/*stuff*/;){//...lots of code if(isEnough())break OUTERLOOP;//...more code}I was won…


Refactoring away labeled loops

After I was convinced that labeled breaks/continues are a total "nono" over here, I need help to remove the label out of my code. I have a square matrix and a vector that has the same length. The vec…


sql - Use a LIKE clause in part of an INNER JOIN

Can/Should I use a LIKE criteria as part of an INNER JOIN when building a stored procedure/query? I'm not sure I'm asking the right thing, so let me explain. I'm creating a procedure that is going to…


sql - What is the difference between “INNER JOIN” and “OUTER JOIN”?

Also how do LEFT JOIN, RIGHT JOIN and FULL JOIN fit in?…


Explicit vs implicit SQL joins

Is there any efficiency difference in an explicit vs implicit inner join? For example: SELECT*FROM table a INNER JOIN table b ON a.id=b.id; vs. SELECT a.*, b.* FROM table a, table b WHERE a.id=…


sql - subselect vs outer join

Consider the following 2 queries: select tblA.a,tblA.b,tblA.c,tblA.d from tblA where tblA.a not in(select tblB.a from tblB) select tblA.a,tblA.b,tblA.c,tblA.d from tblA left outer join tblB on tblA…


Linq to Entity with multiple left outer joins

I am trying to understand left outer joins in LINQ to Entity. For example I have the following 3 tables: Company, CompanyProduct, Product The CompanyProduct is linked to its two parent tables, Company…


Is there a benefit to defining a class inside another class in Python?

What I'm talking about here are nested classes. Essentially, I have two classes that I'm modeling. A DownloadManager class and a DownloadThread class. The obvious OOP concept here is composition. Howe…




join left inner sql multiple tables mysql with from example