hello, I have this query where I am producing a string value in my c# code behind and for whatever reason it doesn't work so my assumptions are that the value needs to be casted or converted from string to datetime which is the destination field type. so I would greatly appreciate any help on the matter...here is my query with my poor attempt at casting which is obviously wrong.SELECT COUNT(CASE WHEN ATT.AL IN ( 'A', 'E', 'I', 'K', 'L', 'S', 'U', 'X' ) THEN ATT.SN END) AS [Total Absences]FROM ATT INNER JOIN STU ON ATT.SN = STU.SN AND STU.SC = @SCWHERE ( STU.ID = @ID ) AND CAST(ATT.DT AS DATETIME >= @dt1 )
Cartesian Yak