• Yes, you're right about NULL. I just tried the use of a boolean bitUseDateSelection (which defaults to 0 unless both dates aren't NULL).

    The result would be something like: SELECT * FROM invoice

    WHERE @bitUseDateSelection = 0  OR [date] BETWEEN @DateFrom AND @DateUntil

    Thanks for your reply.

    Gerry


    Dutch Anti-RBAR League