Greetings.
I have been given a database that has had floating point data added as an array of 500 float (standard 8 byte IEEE) values. It is a hex string 8000 characters long It can be interrogated using the Devart GetBlob function. I'm assuming its been encoded with the same product.
I need to extract this data and perform some statistical analysis upon it.
I have little experience with Delphi or the use of the Devart product and i'm trying not to have to learn a new language if I can help it.
Does anyone have any experience with SQL Server or Visual Basic that could point me in the direction to decode this data.
Here is a sample of the data and the value encoded.
0xED95FE9CEDF8903F - 0.0165745856353591
Thanks
Extract Floating Point numbers from SQL Server image field
Re: Extract Floating Point numbers from SQL Server image field
I have resolved my issue now.
I've had to do a couple of things.
The HEX string has to be reversed. Changed from Bigendian to Littleendian or is it the other way around.
EG. ED95FE9CEDF8903F has to be changed to 3F90F8ED9CFE95ED
and then I am able to apply the .net function BitConverter.Int64BitsToDouble(3F90F8ED9CFE95ED)
to convert it to the numeric value that I need.
All I have to do now is convert this to an MS SQL function and I think we'll be there.
I've had to do a couple of things.
The HEX string has to be reversed. Changed from Bigendian to Littleendian or is it the other way around.
EG. ED95FE9CEDF8903F has to be changed to 3F90F8ED9CFE95ED
and then I am able to apply the .net function BitConverter.Int64BitsToDouble(3F90F8ED9CFE95ED)
to convert it to the numeric value that I need.
All I have to do now is convert this to an MS SQL function and I think we'll be there.
Re: Extract Floating Point numbers from SQL Server image field
It is good to see that the problem has been solved. Feel free to contact us if you have any further questions about SDAC.