Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Sql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-18-03, 15:26
namitao namitao is offline
Registered User
 
Join Date: Apr 2003
Posts: 43
Sql

Hi
I want to run a SQL query on count.
I have a 2 files one is an alcohol outlet and other is convenience stores. I want to check how many alcohol outlets at 0.5 mile radius are there around the stores, say . ex there are 3 alcohol outlets in 0.5 mile radius of a stores A, how do i get the number
thanks for the help
Reply With Quote
  #2 (permalink)  
Old 04-19-03, 10:01
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 4,874
Re: Sql

Quote:
Originally posted by namitao
Hi
I want to run a SQL query on count.
I have a 2 files one is an alcohol outlet and other is convenience stores. I want to check how many alcohol outlets at 0.5 mile radius are there around the stores, say . ex there are 3 alcohol outlets in 0.5 mile radius of a stores A, how do i get the number
thanks for the help

Distance between 2 points (x1,y1) and (x2,y2) is SQRT( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) )
__________________
Tony Andrews
http://tonyandrews.blogspot.com
Reply With Quote
  #3 (permalink)  
Old 04-23-03, 08:30
acg_ray acg_ray is offline
Registered User
 
Join Date: Jan 2003
Location: Pittsburgh, PA
Posts: 86
Re: Sql

Do you have the longitude and latitude of each store from each file? You would need that piece of information in order to calculate the distances between two points on a sphere (such as the earth).
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On