Subject | RE: [firebird-support] Re: Possible to write this in a way that indices will be used |
---|---|
Author | Maya Opperman |
Post date | 2008-05-15T15:28:09Z |
>Doru wrote:>OK, so ((D.SuplCde = :ISupplierCode) or (:ISupplierCode is null))
>If you are using Firebird 2+ Testing DISTINCTness will be a nice way
>to go :
>http://www.firebirdsql.org/manual/nullguide-langelem.html
would change to ((D.SuplCde is not distinct from :ISupplierCode))
to achieve the same results?
Ie. if D.SuplCde is 'ABC' and ISupplierCode is 'ABC', result will be
TRUE.
if D.SuplCde is 'ABC' and ISupplierCode is NULL, result will be
TRUE??
if D.SuplCde is 'ABC' and ISupplierCode is 'XYZ', result will be
FALSE.
Is that right?
Thanks
Maya