November 13, 2006 at 3:36 am
Hi.
Im creating a stored procedure that handles data imports from our vendors. When executing thr sp I have 1 main parameter which is @P_COMMENT NVARCHAR(255)
when executing this stored procedure I would like @P_COMMENT to be something like this
@P_COMMENT = ' This is the vendor data import for: (current date/time)'
to do this I'm trying this:
@P_COMMENT = ('This is the data import for:' & select GETDATE())
would this work or would I have to create another parameter to handle the current date/time?
thanks in advance
November 13, 2006 at 4:18 am
declare @p nvarchar(255)
set @p = 'This is the data import for ' + convert(nvarchar, getdate())
select @p
November 13, 2006 at 6:35 am
many thanks.
November 14, 2006 at 6:41 am
Why not just have a datetime column with a default of getdate() ???
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply