|Subject||RE: [firebird-support] Re: Possible to write this in a way that indices will be used|
>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 :
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
if D.SuplCde is 'ABC' and ISupplierCode is NULL, result will be
if D.SuplCde is 'ABC' and ISupplierCode is 'XYZ', result will be
Is that right?