Home » SQL & PL/SQL » SQL & PL/SQL » help me to do this
help me to do this [message #187219] Fri, 11 August 2006 06:17 Go to next message
born2acheive
Messages: 4
Registered: August 2006
Junior Member
id timefrom timeto
1 6.00am 8.00pm
1 5.00am 6.00 pm

i need ans like this
1 5.00 am to 8.00pm,
please tell me how to do this,give me query please
Re: help me to do this [message #187222 is a reply to message #187219] Fri, 11 August 2006 06:22 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Well, I'm pretty sure this isn't the answer you want, as you are almost certainly looking for a query that will combine overlapping times into contiguous ones.
So, in the interests of getting a better description of your requirements, is this the query you need:
select id, min(timefrom),max(timeto)
from <unnamed_table>
group by id;
Re: help me to do this [message #187412 is a reply to message #187219] Sun, 13 August 2006 15:18 Go to previous message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
i dont no but i am trying to find in some book ...
Previous Topic: how to find what check conditions are given to which data field of table.
Next Topic: etl approach
Goto Forum:
  


Current Time: Fri Dec 09 17:46:12 CST 2016

Total time taken to generate the page: 0.13630 seconds