• Are you using stored procedures?

    Try something like this if you are

    create procedure showdate

    @inputdate datetime = '01/01/9999'

    as

    if @inputdate = '01/01/9999' set @inputdate = getdate()

    select @inputdate



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]