FUNCTION  fCamcol

Extracts Camcol 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.fCamcol(objId) as fCamcol from Galaxy

Input and output parameters

nametypelengthinoutpnum
 int4input0
@ObjIDbigint8input1