Here is what I have so far, but I think this is the old way to do it. SQL 2008 has a new function, I just can't figure out how to incorporate it.

Create Function [dbo].[Distance]
(
@Lat1 Float(18), --User inputs latitude 1 value
@Long1 Float(18), --User inputs longitude 1 value
@Lat2 Float(18), --User inputs latitude 2 value
@Long2 Float(18) --User inputs longitude 2 value
)
Returns Float(18)
AS
Begin
Declare @dLat Float(18);
Declare @dLon Float(18);
Declare @a Float(18);
Declare @c Float(18);
Declare @d Float(18);
Set @dLat = Radians(@lat2 - @lat1);
Set @dLon = Radians(@long2 - @long1);
Set @a = Sin(@dLat / 2)
* Sin(@dLat / 2)
+ Cos(Radians(@lat1))
* Cos(Radians(@lat2))
* Sin(@dLon / 2)
* Sin(@dLon / 2);
Set @c = 2 * Asin(Min(Sqrt(@a)));
Set @d = 3956.55 * @c;
Return @d;
End