Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: datepart parameter in system function dateadd

    Why dont you try something like this if you dont want to use dynamic SQL

    declare @unit nvarchar(5)

    declare @value int

    declare @today datetime

    set @unit = 'YY'

    set @value = 1

    set @today=getdate()

    select case @unit

    ...

Viewing post 1 (of 1 total)