Home » SQL & PL/SQL » SQL & PL/SQL » to calculate the sum of time
to calculate the sum of time [message #395906] Fri, 03 April 2009 01:15 Go to next message
jitixa
Messages: 1
Registered: April 2009
Location: Gujarat
Junior Member
I am having a problem with time related query :

if i m getting 2-3 different times for one single record,then i want sum all times obtained.

for e.g running one query i am getting these times
if times are 1.55 (hh:mm)
1.20
1.00

so I should get the total as 4.15 (hh:mm)

is there any solution..??
Re: to calculate the sum of time [message #395908 is a reply to message #395906] Fri, 03 April 2009 01:17 Go to previous messageGo to next message
BlackSwan
Messages: 25035
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Please, please, please Read & Follow Posting Guidelines above.
Go to the section labeled "Practice" & do as directed.


Post DDL for tables.
Post DML for test data.

Post expected/desired results.
Re: to calculate the sum of time [message #395916 is a reply to message #395906] Fri, 03 April 2009 01:37 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post a Test case: create table and insert statements along with the result you want with these data.
Also always post your Oracle version (4 decimals).

Regards
Michel
Re: to calculate the sum of time [message #395920 is a reply to message #395906] Fri, 03 April 2009 01:48 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
The answer depends entirely on how you are storing your data.

If you've just got a string with '1:50' in it, you'll have to parse the string manually, split out the hours and minutes, and sum them manually.
Previous Topic: Group by on date
Next Topic: NLS for KHMER Cambodian lamguage
Goto Forum:
  


Current Time: Sat Dec 03 14:17:52 CST 2016

Total time taken to generate the page: 0.06282 seconds