FUNCTION  fRun

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

Input and output parameters

nametypelengthinoutpnum
 int4input0
@ObjIDbigint8input1