Subject | RE: [firebird-support] SQL help please |
---|---|
Author | Alan McDonald |
Post date | 2005-02-24T07:10:37Z |
> Will the following two queries give the same results? Is there adoes the first one work at all? I would never have thought it to be valid
> 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
query syntax.
the second would be my natural way to do it.
Alan