PROCEDURE  spGetSpecNeighborsRadius

Get the spectro scienceprimary neighbors to a list of @ra,@dec,@r triplets in #upload in SpecObj

The procedure is used in conjunction with a list upload service, where the (ra,dec) coordinates and the search radius of an object list are put into a temporary table #upload by the web interface. This table name is hardcoded in the procedure. It then returns a matchup table, containing the up_id and the SDSS specObjId. The result of this is then joined with the SpecObj table, to return the attributes of the photometric objects.
create table #x (id int,specObjID bigint)
insert into #x EXEC spGetNeighbours

No parameters