FUNCTION  fSDSS

Computes the 6-part SDSS numbers from the long objID

The bit-fields and their lengths are skyversion[5] + rerun[11] + run[16] + camcol[3] + first[1] + field[12] + obj[16]
select top 5 dbo.fSDSS(objid) as SDSS from PhotoObj

Input and output parameters

nametypelengthinoutpnum
@objidbigint8input1
 varchar64input0