本文介绍了带小数值的添加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个sql queries.i想要检索小时和分钟。根据客户要求,我想添加这样的显示。



Ex - 它的检索(1281.5270)。它应该检索为1281.275(意味着它应该添加5 + 270 = 275)。我有一个sql quiries--



Hi,
i have one sql queries.i want to retrieve hour and minutes. As per client requirement,i want to add display like this.

Ex--its retrieving like this(1281.5270). it should retrieve as 1281.275(means it should add 5+270=275). i have one sql quiries--

select (cast(Sum(IsNull(Effort1,0))as varchar(50))+''+ cast(Sum(IsNull(Effort1Minutes,0))as varchar(50))) as Total1,
          (cast(Sum(IsNull(Effort2,0))as varchar(50))+''+ cast(Sum(IsNull(Effort2Minutes,0))as varchar(50))) as Total2,
           (cast(Sum(IsNull(Effort3,0))as varchar(50))+''+ cast(Sum(IsNull(Effort3Minutes,0))as varchar(50))) as Total3,
            (cast(Sum(IsNull(Effort4,0))as varchar(50))+''+ cast(Sum(IsNull(Effort4Minutes,0))as varchar(50))) as Total4,
             (cast(Sum(IsNull(Effort5,0))as varchar(50))+''+ cast(Sum(IsNull(Effort5Minutes,0))as varchar(50))) as Total5,
              (cast(Sum(IsNull(Effort6,0))as varchar(50))+''+ cast(Sum(IsNull(Effort6Minutes,0))as varchar(50))) as Total6,
               (cast(Sum(IsNull(Effort7,0))as varchar(50))+''+ cast(Sum(IsNull(Effort7Minutes,0))as varchar(50))) as Total7

    FROM TimeSheetDetail





每当我在quiries.i上面运行时,我得到1281.5270(这个只是连接)。现在我想显示这样的(1281.275)



我将如何添加这个?请回复我



whenever i am running this above quiries.i am getting 1281.5270(this one just only concatination). now i want to display like this(1281.275)

how i will add this ? pls reply me

推荐答案


这篇关于带小数值的添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 05:48