Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pass default value as date?
Message
From
02/02/2001 10:47:02
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00471760
Message ID:
00471766
Views:
18
Default the parameter to NULL and then check later in the procedure:

CREATE PROCEDURE spCreditPointCalc
@IDUser integer = 0,
@DateNow datetime = NULL
AS

if @datenow is null
set @datenow = GETDATE()


-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform