sqlchallenged
Programmer
Hi everyone.. Im a ASP programmer in need of help. I have a sql query which i can seem to input into a stored procedure.
I have two tables.... zip and dealers heres the code
SQL Server vesion - use ACOS()**
sSql = "SELECT name, phone, addr1, city, state, zip " & _
"FROM dealer " & _
"WHERE zip in ( SELECT ZIP_CODE FROM zip "& _
"WHERE @radius > 3959 * ACOS(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 name
I have the access query but cant seem to get it..
Please anyhelp will be great
I have two tables.... zip and dealers heres the code
SQL Server vesion - use ACOS()**
sSql = "SELECT name, phone, addr1, city, state, zip " & _
"FROM dealer " & _
"WHERE zip in ( SELECT ZIP_CODE FROM zip "& _
"WHERE @radius > 3959 * ACOS(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 name
I have the access query but cant seem to get it..
Please anyhelp will be great