mkrausnick
Programmer
When I do this:
I get this error:
What am I doing wrong?
Mike Krausnick
Dublin, California
Code:
CREATE PROCEDURE [dbo].[MyProc] @p_EndDate DateTime = GetDate()
If I take away the parentheses it compiles but when I execute it with no supplied date I get:Msg 102, Level 15, State 1, Procedure ap_Ucla_MedicalHome, Line 1
Incorrect syntax near '('.
If execute the SP and supply a date, it runs with no errors.Msg 241, Level 16, State 1, Procedure ap_Ucla_MedicalHome, Line 0
Conversion failed when converting datetime from character string.
What am I doing wrong?
Mike Krausnick
Dublin, California