View Light

Selecting data from recordset

I've got a database table (Geo) with the following:

ID: int (Autoindex, primary key)
X: int
Y: int
Home: int

The table consists of an X/Y grid of data.

While I can do individual queries like "SELECT Home from Geo WHERE X=345 and Y=972" to get an individual value for Home, it's a pretty large grid (1000x1000, a million records), so I'm thinking it will probably quicker to do a query like:

SELECT X,Y,Home FROM Geo WHERE (X BETWEEN 50 and 80) and (Y BETWEEN 200 and 220)

Then somehow select from the recordset using the X & Y values. But I have no idea how to "query" the recordset based on values in the recordset. Hoping someone out there will know how!

Also, is there a good way to move the two dimensional data in the recordset into a two dimensional array?

Thanks in advance!

Rating: (You must be logged in to vote)
Comfortably Anonymous
6/17/2004 6:03:26 PM
0 Dislikes: 0
Comfortably Anonymous
6/18/2004 4:06:33 PM
0 Dislikes: 0
This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those who have expressed a prior interest in receiving the included information for research and educational purposes. For more information go to: . If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner.