Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi guys

im having issues with this.

ALTER PROCEDURE Usp_ClearDaily

@TreatmentDate datetime=''

AS

BEGIN
	
SET NOCOUNT ON;

UPDATE		DailyRecord
SET  [Remarks]	=''
WHERE	TreatmentDate	= @TreatmentDate


END
GO



it is not working. it cannot traverse the date properly
Posted
Updated 24-Jun-12 21:24pm
v3

declare @TreatmentDate datetime instead of @TreatmentDate datetime=''
 
Share this answer
 
Comments
Mico Perez 25-Jun-12 3:28am    
it is not working still. im beginning to bump my head on this one.
can you tell me how the TreatmentDate value looks like and the paramter date value. just print the value.
 
Share this answer
 
Comments
Mico Perez 25-Jun-12 3:41am    
Jun 25 2012 12:00AM
Hi Guys

Thanks for all the help,manage to solved this.

the answer is.

AND CONVERT(VARCHAR, [TreatmentDate],101)	= CONVERT(VARCHAR, @TreatmentDate,101)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900