FUNCTION  fSkyVersion

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

Input and output parameters

nametypelengthinoutpnum
 int4input0
@ObjIDbigint8input1