# "UpdateTimeEntry" Stored Procedure

Description:

This stored procedure updates an existing time entry in the EntryLog table. The input parameters are the id of the record to be altered, as well as all of the new information: User id, Project id, Category id, Entry Date, Description, and Duration.

Definition:

    	CREATE  PROCEDURE TT_UpdateTimeEntry
    	(
    		@EntryLogID int,
    		@UserID int,
    		@ProjectID int,
    		@CategoryID int,
    		@EntryDate datetime,
    		@Description nvarchar(255),
    		@Duration decimal(10,2)
    	)
    	AS

    	UPDATE
    		TT_EntryLog
    			SET
    				UserID=@UserID,
    		     		ProjectID = @ProjectID,
    				CategoryID = @CategoryID,
    				EntryDate = @EntryDate,
    				Description = @Description,
    				Duration = @Duration

    	WHERE
    		EntryLogID = @EntryLogID

Database Tables Used:

The primary key in this table is the EntryLogID identity field. Note that descriptions are limited to 255 characters.