有所作为

时间:2013-05-22 01:15:50

标签: sql-server vb.net

你能帮我解决这个问题吗?...

我有一个名为ticket表的维护表和一个名为workplan的事务表。

故障单表包含tickedIDticketNamestartdateestimated time of completiontotal number of hours列。

然后,工作计划表包含workplanIDticketID(foreignkey)currentdateticket nameno of hourshours remained列。

例如:

我有入场券,如下所示。

ticket ID / ticket name  / start date / estimated time of c. /total nb of hours
1         / sample name  / 05.21.2013 /  05.23.2013          / 21hours  

,下一个表格代表工作计划。

workplanID / ticket ID / currentdate / ticket name / no of hours / hours remained
1001       / 1         / may.21.2013 / sample name / 3           / 18  

...自动生成工作计划ID。

如果用户管理他/她的工作计划。将自动派生当前日期。用户将输入他/她的小时数。

我的问题是如何才能从故障单表中获得总小时数与工作计划表中剩余的小时数之间的差异?

因此,如果用户第二天再次管理了他的工作计划,

workplanID / ticket ID / currentdate / ticket name / no of hours / hours remained
1001       / 1         / may.21.2013 / sample name / 3           / 18  
1002       / 1         / may.22.2013 / sample name / 4           / 14  

谢谢。 :d

我使用vb.net和sqlserver作为我的后端。

(绑定源)

0 个答案:

没有答案