如何在员工的一周内找到netHrs。请帮忙 [英] How to find the netHrs in a week of the employees. Please help

查看:70
本文介绍了如何在员工的一周内找到netHrs。请帮忙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有下表


创建表EmpHrs


(EmpID int,MonIn decimal(5,2),MonOut decimal (5,2),MonBreak decimal(5,2),


TueIn decimal(5,2),TueOut decimal(5,2),TueBreak decimal(5,2),OffWeek十进制(5,2))。我在表中有以下记录。我怎么能 得到一个sql来获取NetHrs 如下所示


(((MonOut - Mon) - MonBreak))  +  ((TueOut-TueIn) - TueBreak)) - OffWeek。请我在一周内寻找帮助找到eah员工的网络。请帮助








polachan

解决方案

SELECT EmpId,(MonOut - MonIn - MonBreak + TueOut - TueIn - TueBreak - OffWeek)AS NetHrs


FROM EmpHrs


I have the following table

Create table EmpHrs

(EmpID int, MonIn decimal(5,2), MonOut decimal(5,2),MonBreak decimal(5,2),

TueIn decimal(5,2), TueOut decimal(5,2),TueBreak decimal(5,2), OffWeek decimal(5,2)). I have the following record in the table. How Can I  get an sql to get the NetHrs  as given below

(((MonOut - Mon ) - MonBreak))  +  ((TueOut-TueIn) - TueBreak) ) - OffWeek. Please I am looking for the help to find the netHrs of eah employee in a week. Please help


polachan

解决方案

SELECT EmpId, (MonOut - MonIn - MonBreak + TueOut - TueIn - TueBreak - OffWeek) AS NetHrs

FROM EmpHrs


这篇关于如何在员工的一周内找到netHrs。请帮忙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆