Subject RE: [firebird-support] SQL help please
Author Alan McDonald
> Will the following two queries give the same results? Is there a
> beneifit to
> doing it either way?
>
> SELECT SUM(Y.TOTAL) FROM TABLEONE X
> LEFT OUTER JOIN TABLETWO Y ON X.LINK = Y.LINK AND Y.DELETED = 'N'
> WHERE X.LINK = 1
>
> SELECT SUM(Y.TOTAL) FROM TABLEONE X
> LEFT OUTER JOIN TABLETWO Y ON X.LINK = Y.LINK
> WHERE X.LINK = 1 AND Y.DELETED = 'N'
>
> TIA
> Gary

does the first one work at all? I would never have thought it to be valid
query syntax.
the second would be my natural way to do it.
Alan