locked
converting hex to decimal and then float or numeric RRS feed

  • Question

  • User351619809 posted

    Hi All,

     I have this hex number. I want to store it in database as numeric or float.

    3D396925

    I tried this.

    declare @nv nvarchar(50)
           ,@execStr nvarchar(2000)
    set @nv = '3D396925'
    
    set @execStr = 'select convert(bigint, 0x' + @nv + ')'
    exec(@execStr)
    

    Just want to store as float.

    Friday, November 20, 2015 12:35 PM

Answers