October 26, 2007 at 10:47 am
I am trying to create a stored procedure with a default value of today basically on the Create_Date datetime column. Any ideas?
ALTER PROCEDURE [dbo].[uspAddProject]
-- Add the parameters for the stored procedure here
@app_general_proj nvarchar(255) = NULL,
@app_general_aka varchar(5000) = NULL,
@app_general_phase varchar(5000) = NULL,
@app_general_location nvarchar(255) = NULL,
@app_general_address varchar(5000) = NULL,
@app_general_section varchar(5000) = Null,
@app_general_floodplain varchar(5000) = NULL,
@app_general_currentZoning varchar(5000) = NULL,
@app_general_currentZoning2 varchar(5000) = NULL,
@app_general_relatedfile1 varchar(5000) = NULL,
@app_general_relatedfile2 varchar(5000) = NULL,
@app_general_relatedFile3 varchar(5000) = NULL,
@app_general_desc varchar(8000) = NULL,
@app_general_CreateDate datetime = CURRENT_DATE,
@app_general_CompletedDate datetime = NULL
October 26, 2007 at 10:52 am
you can use
CURRENT_TIMESTAMP
- OR
GETDATE()
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgViewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply