Your main problem is that you cannot convert a binary(8) that contains the IEEE754 representation of a double-precision number into a SQL Server float just by calling CAST / CONVERT ("Explicit conversion from data type binary to float is not allowed.")Here, I've written a function that essentially reparses the binary representation of the number. This is probably insane. It would almost certainly make more sense to try to interpret the binary(8) bit pattern as a float outside SQL Server, possibly as a CLR user-defined function.CREATE FUNCTION dbo.HexStringToBinary(@hs varchar(max))RETURNS varbinary(max)ASBEGIN IF SUBSTRING(@hs, 1, 2) = '0x' SET @hs = SUBSTRING(@hs, 3, LEN(@hs)) RETURN CASE WHEN @hs LIKE '%[^0-9A-Fa-f]%' THEN NULL ELSE (SELECT CAST('' as xml).value('xs:hexBinary(sql:variable("@hs"))', 'varbinary(max)')) ENDENDGO-- This function is for demonstration purposes and has not been tested:-- Do not use it for anything that matters!CREATE FUNCTION dbo.BinaryToFloat(@float_bytes binary(8))RETURNS floatASBEGIN DECLARE @sign float, @raw_exponent smallint, @raw_mantissa bigint, @true_exponent smallint SET @sign = CASE WHEN CAST(SUBSTRING(@float_bytes, 1, 1) AS tinyint) & 0x80 = 0x80 THEN -1.0 ELSE 1.0 END SET @raw_exponent = (CAST(SUBSTRING(@float_bytes, 1, 2) AS smallint) & 0x7FF0) / 0x10 SET @raw_mantissa = CAST(SUBSTRING(@float_bytes, 2, 7) AS bigint) & 0xFFFFFFFFFFFFF -- Put some Zero, denormal, infinity and NaN handling here! SET @true_exponent = CASE WHEN @raw_exponent BETWEEN 0x001 AND 0x7FE THEN @raw_exponent - 0x3FF ELSE NULL END RETURN @sign * CAST((@raw_mantissa | 0x10000000000000) AS float) * POWER(CAST(2.0 AS float), @true_exponent - 52)ENDGODECLARE @mystery_string varchar(max), @mb varbinary(max)SET @mystery_string = '0000 01F6408A E6EA 1999 DDE4 408A F4AB F219 CA67408B 026D D68F 27CC 408B 102F C6CE 8A31408B 1DF1 C2AC 85B5 408B 2BB3 C9FD AE7A408B 3975 DC96 989C 408B 4737 FA4B D83D408B 54FA 22F2 017C 408B 62BC 565D A879408B 707E 9463 6151 408B 7E40 DCD7 C027408B 8C03 2F8F 5918 408B 99C5 8C5E C044408B A787 F31A 89CA 408B B54A 6397 49CB408B C30C DDA9 9465 408B D0CF 6125 FDB9408B DE91 EDE1 19E5 408B EC54 83AF 7D09408B FA17 2265 BB46 408C 07D9 C9D8 68B9408C 159C 79DC 1982'SET @mb = dbo.HexStringToBinary( REPLACE(REPLACE(REPLACE(@mystery_string, ' ', ''), CHAR(13), ''), CHAR(10), ''))SELECT n, float_bytes, dbo.BinaryToFloat(float_bytes) AS fFROM ( SELECT N.n, SUBSTRING(@mb, 5 + 8*N.n - 8, 8) AS float_bytes FROM dbo.Numbers AS N WHERE N.n BETWEEN 1 AND CAST(SUBSTRING(@mb, 1, 4) AS int) ) AS A