I have following sql query when i execute it zero rows are displayed i have feild called distance with value null in it , when i execute this query the distance feild will be filled with some numerical value but if i specify condition distance<2 or distance <10 or ... same result gets displayed can i know the whats problem.
SELECT Id,Name1,ZipCode,StreetName,StreetNumber,State1,Lat,
Lng,Keyword,
( 6371 * ACOS( COS( (12.925432/57.2958) )
* COS( (Lat/57.2958) ) * COS( ( Lng/57.2958 ) - (77.5940171/57.2958) )
+ SIN( 12.925432/57.2958 ) * SIN( Lat/57.2958 ) ) ) AS distance
FROM Business_Details
where (
(StreetName like '%jayanagar%')
and (Keyword like '%plumbing%' )
and (distance<3)
)
ORDER BY distance;