|
Is it possible to create sub select statements in a view? I'm being asked to do something like this...
(comments are locked)
|
|
you can either move that WHERE snippet to the end of the query as a regular where clause, which makes sense with the left table of a LEFT OUTER JOIN...
or you can do it inline like you have it with an and
though I do have to wonder why you would LEFT OUTER JOIN Table3 with a test for equality between columns Table4 and Table5 (maybe Table5.Col1 is Table1.Col5?) +1, Nails it.
Jun 18 '11 at 02:56 AM
Matt Whitfield ♦♦
+1 I think KenJ addresses this, but be clear that with outer joins, a condition in the WHERE clause is different than putting it in the JOIN and can return different row sets. With all inner joins this distinction goes away.
Jun 18 '11 at 09:20 AM
Scot Hauder
Thanks Ken and Scot! Also sorry to through you off with the LEFT OUTER JOIN...etc It was a quick rough example but I did get the answer on the correct syntax.
Jun 19 '11 at 11:15 PM
technette
(comments are locked)
|

