From: Cathy on 7 Oct 2009 05:09 In SQL Server 2005, I have a varbinary(4000) column which contains a 60 element float array. Using SQL (or similar) how can I extract the contents of the varbinary and print out the data as 60 floats? Each float has a precision of 9 decimal places. Many thanks, cathy
From: Rahul on 7 Oct 2009 06:10 On Oct 7, 2:09 pm, Cathy <cathywigz...(a)yahoo.co.uk> wrote: > In SQL Server 2005, I have a varbinary(4000) column which contains a > 60 element float array. Using SQL (or similar) how can I extract the > contents of the varbinary and print out the data as 60 floats? Each > float has a precision of 9 decimal places. > > Many thanks, > > cathy Hi, Please send the DDL and sample data. Rahul
From: Rahul on 7 Oct 2009 06:11 On Oct 7, 2:09 pm, Cathy <cathywigz...(a)yahoo.co.uk> wrote: > In SQL Server 2005, I have a varbinary(4000) column which contains a > 60 element float array. Using SQL (or similar) how can I extract the > contents of the varbinary and print out the data as 60 floats? Each > float has a precision of 9 decimal places. > > Many thanks, > > cathy Hi, Please send the DDL and sample data. Rahul
From: Cathy on 7 Oct 2009 06:42 Sorry, short of sending you a database backup, I can't do that Cathy
From: Gert-Jan Strik on 7 Oct 2009 14:40 Cathy, You would need a better specification of the data format. That is why Rahul asked for DDL and sample data. You could use SUBSTRING to extract individual floats, CAST them to float and do with them as you please. Depending on the data format, you have to create a cursor or loop, or you might be able to use a set based approach using a numbers table. -- Gert-Jan SQL Server MVP Cathy wrote: > > In SQL Server 2005, I have a varbinary(4000) column which contains a > 60 element float array. Using SQL (or similar) how can I extract the > contents of the varbinary and print out the data as 60 floats? Each > float has a precision of 9 decimal places. > > Many thanks, > > cathy
|
Next
|
Last
Pages: 1 2 Prev: SQL Globalization / Localization Next: Display of DATE format in Management Studio |