计算所有列并分别将答案放在另一列中 [英] Compute all column and put the answer in another column respectively

查看:92
本文介绍了计算所有列并分别将答案放在另一列中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好日子亲爱的程序员,我想从另一个计算1列,因为我开发了一个考勤系统,我想要的是计算列时间和列超时之间的差异,我想把答案给另一列分别示例:





col_time_in

2013-12-16 10:41:00

2013-12-17 8:00:00

2013-12-18 7:30:00

2013-12-19 9:35 :00

2013-12-20 10:16:00



col_time_out

2013-12-16 17:00:00

2013-12-17 14:20:00

2013-12-18 15:30:00

2013 -12-19 17:15:00

2013-12-20 17:20:00



我想计算所有内容col_time_in和col_time_out来获取它们的时差

并且所有答案都将被重定向到col_totaltime,我怎么能这样做,分别在人们知道的同时计算所有内容?



谢谢:)

决方案

这很简单而不是问这样的问题试着去谷歌并得到一些答案它会帮助你整个你的发展生涯



这里是链接中的一个



http://stackoverflow.com/questions/17278791/computed-column-specification-in-sql-server-time-difference-in-hours-or-minute [ ^ ]


检查这个类似的问题

http://forums.asp.net/t/1188751.aspx [ ^ ]


Good day dear programmers, i want to compute 1 column from another, because im developing a attendance system, and what i want to make is compute the difference between Column Time in and Column Time out, i want to put the answer to another column respectively Example:


col_time_in
2013-12-16 10:41:00
2013-12-17 8:00:00
2013-12-18 7:30:00
2013-12-19 9:35:00
2013-12-20 10:16:00

col_time_out
2013-12-16 17:00:00
2013-12-17 14:20:00
2013-12-18 15:30:00
2013-12-19 17:15:00
2013-12-20 17:20:00

I would like to compute all content of col_time_in and col_time_out to get their time difference
and all the answer will be redirected to col_totaltime, how can i possibly do that, compute all the content respectively at the same time anyone knows?

thanks :)

解决方案

It's very simple instead of asking such questions try to google out and get some answers it will help you throughout your development career

Here is 1 of many of link

http://stackoverflow.com/questions/17278791/computed-column-specification-in-sql-server-time-difference-in-hours-or-minute[^]


check this similar question
http://forums.asp.net/t/1188751.aspx[^]


这篇关于计算所有列并分别将答案放在另一列中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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