Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

query to calculate time frames

User_8P4FCJan 11 2012 — edited Jan 11 2012
hello,
id like to write a query that will calculate time frames ;
my source table looks like this:
company	category	date
ORACLE	A	1/01/2012
ORACLE	A	2/01/2012
ORACLE	B	3/01/2012
ORACLE	C	4/01/2012
IBM	A	1/01/2012
IBM	A	2/01/2012
IBM	A	3/01/2012
IBM	A	4/01/2012
my desired result:
company	category	from	to
ORACLE	A	1/01/2012	2/01/2012
ORACLE	B	3/01/2012	3/01/2012
ORACLE	C	4/01/2012	31/12/2999
IBM	A	1/01/2012	31/12/2999
can you please guide me with use of which functions i can achieve that?
id appreciate any tips
thank you
rgds

Edited by: UserMB on Jan 11, 2012 5:14 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2012
Added on Jan 11 2012
10 comments
227 views