Home Forums SQL Server 2008 T-SQL (SS2K8) Converting varbinary to numeric type in tsql -- decimal in c# RE: Converting varbinary to numeric type in tsql -- decimal in c#

  • i'm not sure if this will help, I'd really like to see a handful of sample data rows, and their expected values to really be sure.

    but can you convert them directly to a decimal and back? or is there more to it than that?

    select convert(varbinary,8789961.4513)

    select convert(decimal(19,4),0x0B04000131AD397714000000)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!