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
|
Name | Type | Length | inout | pnum |
@ra | float | 8 | input | 1 |
@dec | float | 8 | input | 2 |
@r | float | 8 | input | 3 |
@table | tinyint | 1 | input | 4 | bigint | 8 | output | 1 |