问题描述
我使用c#....在asp.net中创建了一个Task Master Web表单,其中我有一列作为特定员工的特定任务的花费时间....所以要获取花费的小时总数我写了sql查询为
从Task_Master中选择Count(Spenthrs),其中Eid ='PS103'和Tname ='t1';
例如...
如果编号为PS103的员工执行任务t1,他一天花了2个小时,另一天花了5个小时,第二天3小时等...然后花费的小时总数应该是10 ...但是我写的上述查询给我算作3 ...所以这对于SQL查询语法是什么...? ??
I had created one Task Master web form in asp.net using c#....in which i had one column as Spent Hours for the particular task of particular employee....so to fetch the total numbers of spent hours i wrote the sql query as
Select Count(Spenthrs) from Task_Master where Eid='PS103' and Tname='t1';
for example...
if PS103 numbered employee perform task t1 and he spent 2 hours one day,5 hours on another day,3 hrs on the next day etc... then total numberof spent hours should be 10...but the above query which i wrote give me count as 3...so what will be right sql query syntax for this...???
推荐答案
这篇关于我想计算特定员工花费的总小时数....那么sql查询会是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!