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

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -