R
rogge
The function calculates the distance between two latitude/longitude pairs.
The result is either -1 or the distance AS Single. (find zip codes within
'x' miles of another zip code, return -1 if too far away)
The "complex" error only occurs when the function, FCN, references fields in
the query and a constraint is placed on that value. the erorr does not occur
when additional constraints are placed on the function....
pseudo SQL:
SELECT zip, lat, lng, FCN(lat, lng)
FROM tblZipCodes
WHERE ((not isnull(lat)) AND (not isnull(lng)) AND (FCN(lat,lng))>-1);
I have tried appending functions to FCN, NZ, CSng, and CDbl, to 'force' a
number, but no luck.
What suggestions do you folks have?
thank you
The result is either -1 or the distance AS Single. (find zip codes within
'x' miles of another zip code, return -1 if too far away)
The "complex" error only occurs when the function, FCN, references fields in
the query and a constraint is placed on that value. the erorr does not occur
when additional constraints are placed on the function....
pseudo SQL:
SELECT zip, lat, lng, FCN(lat, lng)
FROM tblZipCodes
WHERE ((not isnull(lat)) AND (not isnull(lng)) AND (FCN(lat,lng))>-1);
I have tried appending functions to FCN, NZ, CSng, and CDbl, to 'force' a
number, but no luck.
What suggestions do you folks have?
thank you