User Profile

Collapse

Profile Sidebar

Collapse
p309444
p309444
Last Activity: May 17 '10, 10:06 AM
Joined: Dec 29 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • p309444
    replied to Get the id of the next closest location
    Hi.

    I just thought I would post the final solution that I came up with for this problem.

    Its pretty lengthy so I'll try my best to describe it.

    Firstly, I created a view called vw_distance which was just all the pois joined to all the locations. This view had 3 columns: poiID, locationID and distance (distance being the distance between the location and the poi)

    The next bit is where the...
    See more | Go to post

    Leave a comment:


  • p309444
    replied to Get the id of the next closest location
    I guess what I am asking is what is the best way to go to to get this done.

    I have tried several methods, each one with it's own pitfalls. I didnt include them because I wanted people to look at this problem from a fresh slate, however I will detail two methods I have used:

    Code:
    declare @locationid int = 1
    
    select p.id,
    	dbo.fnc_calc_distance(p.lat, p.lng, l.lat, l.lng) as distance,
    	c.houseID as
    ...
    See more | Go to post

    Leave a comment:


  • p309444
    replied to Get the id of the next closest location
    EDIT: I have missed a column from each of the tables. Both tables need a column adding called region of type int. For the purposes of this, the values in this column of every row should be 1
    See more | Go to post

    Leave a comment:


  • Do you mean set the text in a text box programmaticall y?

    textboxid.text= "Hello World"
    See more | Go to post

    Leave a comment:


  • p309444
    started a topic Get the id of the next closest location

    Get the id of the next closest location

    Hi.

    I have an application in which the user can select a location and view it's distance from several Points Of Interests (POIs).

    When I retrieve these distances, I would also like to retrieve the ID's of the locations that are the next closest and the next furthest away from each POI. eg. If we have 10 locations, each of them a mile further away from a certain POI the I would like to return: The name of the POI, The...
    See more | Go to post
No activity results to display
Show More
Working...