How to modify the below procedure in order to get the latest date ( the biggest value ) in the column “Deadline”, type smalldatetime, ( example: 24/02/2007 00:00:00 ) for a given customer “UserName” ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CREATE PROCEDURE GetLatestDate
(@UserName VARCHAR(50)
AS
SELECT Deadline
FROM CustomerItems
WHERE UserName = @UserName