Scalar Function to Determine Age at a Given Date
This function was written to supplant cumbersome age-at calculations. To execute, simply set a local INT variable equal to the output of the function. For example, the following, given my birthdate, computes my own age: DECLARE @age_at INT SET @age_at = dbo.f_age_at ('2/16/1954', GETDATE ())
2002-05-09
1,074 reads