FUNCTION  fField

Extracts Field from an SDSS Photo Object ID.

The bit-fields and their lengths are: Skyversion[5] Rerun[11] Run[16] Camcol[3] First[1] Field[12] Obj[16]
select top 10 objId, dbo.fField(objId) as fField from Galaxy

Input and output parameters

nametypelengthinoutpnum
 int4input0
@ObjIDbigint8input1