im doing a gym software. i have a signin signout system.when members sign in this data is put in a table leaving the signout colomn empty.then when member sign out the signout cell is updated.up to here is fine. but if the member signed in and out twice i dont want the sigout time of the first time to be changed.i want only the null cell to be updated or where the signin time is max. i have the following stored procedure with no errors but when running nothin is happening to the signout cell!
ALTER proc [dbo].[updateSignOutMem]
@ID nvarchar(50), @signOut nvarchar(50),@date nvarchar(50)
as
update [DateTable]
set SignOut = @signOut
where ID = @ID AND [Date] = @date and SignOut = null ;