| Returns the specObjId of nearest sciencePrimary spectrum within @r arcmins of ra, dec |
| ra, dec are in degrees, r is in arc minutes. This scalar function is used for matchups of external catalogs. It calls fGetNearestSpecObjEq(@ra,@dec,@r), and selects the specObjId (a bigint). This can be called by a single SELECT from an uploaded (ra,dec) table. An example: SELECT id, ra,dec, dbo.fGetNearestSpecObjIdEq(ra,dec,3.0) as specObjId FROM #upload WHERE dbo.fGetNearestSpecObjIdEq(ra,dec,3.0) IS NOT NULL
|
| name | type | length | inout | pnum |
| @ra | float | 8 | input | 1 |
| @dec | float | 8 | input | 2 |
| @r | float | 8 | input | 3 |
| bigint | 8 | input | 0 |