I have the following in SQL Server 2008
Parm Input is Start as datetime
If I hard code a Date it works:
UPDATE [WORKING_SVR_CLOSED]
SET [TTRHours] = 'Yes'
FROM [GM].[dbo].[DATA_CLEANING] AS dc
LEFT OUTER JOIN [GM].[dbo].[WORKING_SVR_CLOSED] AS o ON DC.Number = o.DimensionDataRef
WHERE DC.[Date ] = CONVERT (CHAR(255),'04/14/10',107)
This Does not work:
UPDATE [WORKING_SVR_CLOSED]
SET [TTRHours] = 'Yes'
FROM [GM].[dbo].[DATA_CLEANING] AS dc
LEFT OUTER JOIN [GM].[dbo].[WORKING_SVR_CLOSED] AS o ON DC.Number = o.DimensionDataRef
WHERE DC.[Date ] = CONVERT (CHAR(255),@StartDate,107)
@StartDate comes out 2014/04/14
How can I correct this? Thanks in advance!
Parm Input is Start as datetime
If I hard code a Date it works:
UPDATE [WORKING_SVR_CLOSED]
SET [TTRHours] = 'Yes'
FROM [GM].[dbo].[DATA_CLEANING] AS dc
LEFT OUTER JOIN [GM].[dbo].[WORKING_SVR_CLOSED] AS o ON DC.Number = o.DimensionDataRef
WHERE DC.[Date ] = CONVERT (CHAR(255),'04/14/10',107)
This Does not work:
UPDATE [WORKING_SVR_CLOSED]
SET [TTRHours] = 'Yes'
FROM [GM].[dbo].[DATA_CLEANING] AS dc
LEFT OUTER JOIN [GM].[dbo].[WORKING_SVR_CLOSED] AS o ON DC.Number = o.DimensionDataRef
WHERE DC.[Date ] = CONVERT (CHAR(255),@StartDate,107)
@StartDate comes out 2014/04/14
How can I correct this? Thanks in advance!