I am trying to create a stored procedure that runs a query on a large
database of points in an area. In addition to the recordset of
points, I would like to return, in output parameters, the average
latitude and longitude of the set of returned points in order to
generate a map that is centered around all the points.
This is a pseudo-code example of the query:
CREATE PROCEDURE GetPoints
SELECT Lat, Long, Picture
FROM PointDB
---- After running the query, I would like to query the result set
SELECT AVG(Lat), AVG(Long)
FROM [above recordset]
Is this possible? A temporary table would work, but it seems
redundant.
Thanks,
Chuck