i am trying to write a quite tutorial for learncf on a dealer locator. I guess you have to use one of the included db's so I am using one of the derby ones cause well.. thats all there is and this query is choking on it, it works on mysql but I know diddlysquat about derby
the query SELECT *,ROUND((ACOS((SIN(#lat_A#/57.2958) * SIN(#lat_B#/57.2958)) + (COS(#lat_A#/57.2958) * COS(#lat_B#/57.2958) * COS(#lon_B#/57.2958 - #lon_A#/57.2958)))) * 3963) AS distance FROM centers WHERE center_id = '23' AND (#lat_B# >= #lat_A# - (#radius2#/111)) AND (#lat_B# <= #lat_A# + (#radius2#/111)) AND (#lon_B# >= #lon_A# - (#radius2#/111)) AND (#lon_B# <= #lon_A# + (#radius2#/111)) ------------------------------------------------------------- here is the error Error Executing Database Query. Syntax error: Encountered "," at line 1, column 18. The error occurred in z:\Websites\ssssss\tutorials\zipcode\cfc\zipcode.cfc: line 43 41 : AND (#lat_B# <= #lat_A# + (#radius2#/111)) 42 : AND (#lon_B# >= #lon_A# - (#radius2#/111)) 43 : AND (#lon_B# <= #lon_A# + (#radius2#/111)) 44 : </cfquery> 45 : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294409 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

