sql server 2008 - Number conversion with decimal -


how convert following numbers

0.065000 1.000000 

to

0.065 1 

thanks.

try,

declare @val sql_variant,@i sql_variant set @val=0.065000 select @i=sql_variant_property(@val, 'scale')  select (cast(@val float) * power(10 , cast(@i int)) )/ power(10 , cast(@i int)) 

Comments

Popular posts from this blog

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -