About
Pricing
Community
Teams
Start Free Trial
Log in
Cartillo
asked on
5/14/2011
Total duration
Hi Experts,
I would like to request Experts help. How to make sure column at "TotalDuration" will automatically sum up time value from TimeIN and TimeOUT columns. Attached the print screen of the MSsql table for Experts perusal. Hope Experts will help.
total.png
Microsoft SQL Server
10
5
Last Comment
Cartillo
8/22/2022 - Mon
Rajkumar Gs
5/14/2011
Use a trigger on INSERT OR UPDATE, which will update TotalDuration column with the calculated value (sum)
Cartillo
5/14/2011
ASKER
Hi RajkumarGS,
How to do this in MSSQL? Please advice
ASKER CERTIFIED SOLUTION
Rajkumar Gs
5/14/2011
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Rajkumar Gs
5/14/2011
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Patrick Matthews
5/14/2011
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Anthony Perkins
5/14/2011
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Rajkumar Gs
5/15/2011
Yes. Patrick and acperkins are right.
I also suggest - Instead of using trigger, you can fetch calculated TotalDuration data on demand.
@Cartillo: You may please ignore all my comments in this thread.
Raj
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Cartillo
5/15/2011
ASKER
Hi,
I've revised my sql table, attached the print screen, hope I've followed as per guide..
total1.png
SOLUTION
Patrick Matthews
5/15/2011
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Cartillo
5/23/2011
ASKER
Hi,
Thanks for the guide.