Replacing a null value with a default value in a SP

  • I need to write a stored procedure that will substitute a a null date field with a default date within the recordset. I don't want this to replace the null date in the table just replace it with todays date.

    Thanks...

    K-

  • When you do the select in the Sp, you just have to give a ISNULL. That should work

    Select isNULL(dateColumn,getdate()) , col2 from table1

    where ....

    -Roy

  • Thanks! That was an easy one for the day. Thinking to much about time off I guess.

    Happy holiday!

    K-

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply