From: DavidC on
I have a stored procedure that I want to make the last parameter optional and
default to NULL if not sent. Below is the procedure declaration and I want
to have the @Week1Ending date as optional and null. How do I do this?
Thanks.

ALTER PROCEDURE [dbo].[mc_insTimesheetsTemp]
@WorkerLinkID int,
@ClientLinkID int,
@PriorPeriodEnding date,
@PeriodEnding date,
@Week1Ending date
--
David
From: Tom on
On Mar 10, 12:09 pm, DavidC <dlch...(a)lifetimeinc.com> wrote:
> I have a stored procedure that I want to make the last parameter optional and
> default to NULL if not sent.  Below is the procedure declaration and I want
> to have the @Week1Ending date as optional and null.  How do I do this?  
> Thanks.
>
> ALTER PROCEDURE [dbo].[mc_insTimesheetsTemp]
>         @WorkerLinkID           int,
>         @ClientLinkID           int,
>         @PriorPeriodEnding      date,
>         @PeriodEnding           date,
>         @Week1Ending            date
> --
> David

ALTER PROCEDURE [dbo].[mc_insTimesheetsTemp]
@WorkerLinkID int,
@ClientLinkID int,
@PriorPeriodEnding date,
@PeriodEnding date,
@Week1Ending date = null
 | 
Pages: 1
Prev: Some comment.
Next: Infinite Recursive CTE