Assuming your GeoLoc column is of the 'Geography' data type in SQL server, you should be able to use something like this:
select
t1.*,
t2.*,
t1.GeoLoc.STDistance(t2.GeoLoc) as DistanceApart
from table1 t1
join table2 t2
on (t1.GeoLoc.STDistance(t2.GeoLoc) <= @distanceX)
with the 'DistanceApart' and 'distanceX' values being in meters