can I get a query to do this?

  • Thread starter Thread starter athansor
  • Start date Start date
A

athansor

Guest
Hi
I'm new to the forum, and have a question about whether or not I can build a query to do the following:

I have approximately 60000 geographical locations in a database for which various parameters are recorded such as thickness of porous sands and elevation. What I would like to do is design a query that for each point would find the surrounding points and report a list of the values of the chosen parameter for those surrounding points.

The points are recorded using a gridnumber as a primary key, an x and a y coordinate in UTM feet and then the parameter (thickness in this case)

I basically want to do this

Given a gridnumber with coordinates (x0,y0)

Search the database for all gridnumbers where the x coordinate is between (x0-3960, x0+3960) and the y coordinate is between (y0-3960,y0+3960) and then list the values of the parameter for the gridpoints that are in that range in a row.

I'd like to be able to build an excel file with the output with headers like this
gridnum|x|y|thickness 1|thickness 2|...........|thickness n|

Is this kind of thing possible in access?

Thanks, and I'm glad I found this place :)
 
Are the coordinates stored in seperate fields, and are they numeric?


If so,

SELECT * FROM Tablename WHERE ((tablename.Xcoord > ([Starting X Coordinate]-[X Coordinate Difference]) AND (tablename.Xcoord < ([Starting X Coordinate]-[X Coordinate Difference])) AND (tablename.Ycoord > ([Starting Y Coordinate]-[Y Coordinate Difference]) AND (tablename.Ycoord < ([Starting X Coordinate]-[X Coordinate Difference]))

If you actually stored the coordinates together in one field as a string, there will be considerably more work involved, but still possible.


I think your asking for the query to do more than this, but this will set the criteria of the records.
 
They are in seperate fields and are numeric, so I'll give what you have there a try.
Thanks
Sue
 

Users who are viewing this thread

Back
Top Bottom