If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
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, 14: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, 09:01
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
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://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 04-23-03, 07: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

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