Solved

convert hr to minutes and add mm part to converted minutes

Posted on 2003-12-05
4
651 Views
Last Modified: 2011-09-20
hi
i am using oracle 8i
my table structure is
SQL> desc TESTEFFORT
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ------------
--------------------
 NO                                                             NUMBER(4)
 HOURS                                                          NUMBER(5,2)

SQL> select * from TESTEFFORT;

       NO     HOURS
--------- ---------
        1       1.5
        1       1.5
        1       .35
        1      1.05
        1       2.4
        2       1.5
        2       1.5
        2       1.5
        2       1.5
        2       1.5
i want  individual  sum of minutes  
the out put is
No          minutes
-----------------
1          380
2          550
0
Comment
Question by:schavalam
4 Comments
 
LVL 19

Accepted Solution

by:
Rimvis earned 50 total points
ID: 9881904
Is this what you want:

select No, SUM(HOURS) * 60 AS minutes from TESTEFFORT GROUP BY No;
0
 
LVL 8

Expert Comment

by:gajender_99
ID: 9882014
select No, SUM(HOURS) * 60 AS minutes
from TESTEFFORT
GROUP BY No
order by no asc;

0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
This article describes some very basic things about SQL Server filegroups.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now