Click here to Skip to main content
15,921,959 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sir,

I want SQL Queries for this below issue.

I have 3 columns in one table.i.e customer Name, LOB,NoOfHoursConsumed.

EX-
SQL
Customer Name  LOB   NoOfHoursConsumed
    
 AAA         BAS     9.40(means 9 Hr and 40 min)
 AAA         BAS     5.58(means 5 hr and 59 min)


Here in my table customer name and BAS is repeating . i want to retrieve data one time with calculation like AAA-->BAS--15.38(means 9.40+5.58=15.38(after converting into mins). please reply me with SQL Queries.
Posted
Updated 5-Dec-13 23:27pm
v5

1 solution

Select CustomerName,Lob,sum(NoOfHoursConsumed) from tbl
group by CustomerName,Lob
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900