
/* Code Fragment 5.13 Define a first_instant function. */

CREATE PROCEDURE first_instant
	@one DATETIME, 
	@two DATETIME,
	@three DATETIME OUTPUT 
AS 
SELECT @three =
CASE
	WHEN @one > @two
		THEN @one
		ELSE @two
END



