dealer locator

O

Olivia Towery

I was using this script when the site was on an access db. Now the site has
been upsized to SQL 2000. What changes do I need to make so this will work
with my current db?

sSql = "SELECT * " & _
"FROM tblAds " & _
"WHERE Display=1 AND zip in ( SELECT ZIP_CODE FROM zipsave "& _
"WHERE @radius > 3959 * ATN( SQR(1 - (SIN(@lat/ 57.3)
* SIN(LAT/ 57.3) + " & _
"COS(@lat/ 57.3)
* COS(LAT/ 57.3) * " & _
"COS((LNG/
57.3) - (@lng/ 57.3))) ^2 ) /" & _
"(SIN(@lat/ 57.3) * SIN(LAT/ 57.3) + " & _
"COS(@lat/ 57.3)
* COS(LAT/ 57.3) * " & _
"COS((LNG/
57.3) - (@lng/ 57.3))) ) ) " & _
"ORDER BY AdID"

I get errors on function SQR and ATN. Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top