On Mon, 14 Jan 2002, Mike Finn wrote:
> I have two stored procedures and one calls the other. If
> the caller passes a null for one of the parameters (the fourth) a delete
> query in the called function will not work.
>
> If I pass a null as the 4th parameter (_seqSalesOrderLine) the delete
> query below will not match any records, and my business rule fails. If I
> temporarily (for testing only) change the asterisked line to read
> and seqSalesOrderLine = null
> the query works as I would expect.
The only reason the above works is probably due to the hack that treats
the explicit = NULL token sequence as IS NULL which is the correct way to
compare for nulls. SQL basically wants = between a NULL value and
anything to be unknown.