Is it possible to dynamically modify the Datepart argument of the DATEADD function in T-SQL 2005.
I am trying to do something like this but it's not happy with parameter 1:
DECLARE @pp NCHAR(3)
SET @pp = 'day'
SELECT dateadd(@pp,3,' 2007-07-14 12:00:00')
Any Ideas will be much appreciated.
I am trying to do something like this but it's not happy with parameter 1:
DECLARE @pp NCHAR(3)
SET @pp = 'day'
SELECT dateadd(@pp,3,' 2007-07-14 12:00:00')
Any Ideas will be much appreciated.
Comment