Oracle question

Associate
Joined
23 Aug 2004
Posts
1,493
I have a table 'testdates'. It has 6 date fields as follows:

start1
end1
start2
end2
start3
end3

I need a query to return the pair of dates the current date falls between.

eg

start1 = 1-jan-09
end1 = 31-jan-09
start2 = 01-Feb-09
end2 = 30-Sep-09
start3 = 01-Oct-09
end3 = 25-Dec-09

would return start2 and end2.

Terribly designed table I know but I can't change that unfortunately, is there a query that could do this for me?
 
Any chance you could post up the solution for the case? Not for me personally, but it's annoying when you find forum posts from Google and people say "fixed it" without posting the answer :p.
 
Back
Top Bottom