From: Cathy on
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
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
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
Sorry, short of sending you a database backup, I can't do that

Cathy
From: Gert-Jan Strik on
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