would this work?

  • 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

     

  • declare @p nvarchar(255)

    set @p = 'This is the data import for ' + convert(nvarchar, getdate())

    select @p

  • many thanks.

  • 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