>>Try using 1.0/111.0
>>
>>or (I have also dropped some parentheses in order to avoid surprises
>>@CenterLat - 1/111 * @SearchDistance
>>
>>also put SearchDistance before /111
>>
>>
>>select * from Test
>> where(latitude between @CenterLat - @SearchDistance/111.0 and @CenterLat + @SearchDistance/111.0 ) and
>> (longitude between @CenterLon - @SearchDistance/111.0 and (@CenterLon + @SearchDistance/111.0) )
>>
>
>This one finds both.
>
>Thanks
It must be related to the float/int mix
Maybe 1/111 evaluates to zero
Gregory