FUNCTION  fHMSbase

Base function to convert right ascension in degrees to +hh:mm:ss.ss notation.

SDSS SkyServer function, courtesy Johns Hopkins University.
@truncate is 0 (default) if decimal digits to be rounded, 1 to be truncated.
@precision is the number of decimal digits, default 3.
Example usages:

SELECT dbo.fHMSbase(187.25679,1,4)
=> 12:29:01.6296

SELECT dbo.fHMSbase(187.25679,default,default)
=> 12:29:01.630

NameTypeLengthinoutpnum
@degfloat8input1
@truncateint4input2
@precisionint4input3
 varchar32output1