FUNCTION  fGetNearestObjIdEq

Returns the objId of nearest @table object within @r arcmins.

This scalar function is used for matchups of external catalogs.
It calls the fGetNearestObjEq(@ra,@dec,@r), and selects
the objId (a bigint). This can be called by a single SELECT from an uploaded
(ra,dec) table.

An example:

SELECT id, ra,dec, dbo.fGetNearestObjIdEq(ra,dec,3.0,1) AS objId
FROM #upload
WHERE dbo.fGetNearestObjIdEq(ra,dec,3.0,1) IS NOT NULL


NameTypeLengthinoutpnum
@rafloat8input1
@decfloat8input2
@rfloat8input3
@tabletinyint1input4
 bigint8output1