138 reputation
5
bio website
location
age 31
visits member for 3 years, 2 months
seen May 2 at 13:17

May
2
comment SQL query for next occurrence of specific date
@ypercube if you have a better idea, i'd love to hear it. the inner query merely returns a list of all months and using all_objects simply as a way of returning a specific number of rows. then, the outer query returns the first result of the inner query that is greater than the current date.
May
1
answered SQL query for next occurrence of specific date
May
1
comment SQL query for next occurrence of specific date
@AnupShah Correct. This is all wrapped in a single function. There is a case statement that first determines the expiration type before applying the appropriate logic. The query I provided above is for when expiration type is YTY (year-to-year). @cha I don't see how that works. For example, if the initial expiration was 3/22/2014, simply using rownum * 6 returns a result of 9/22/2014 when the correct response would be 12/1/2014.
Apr
30
asked SQL query for next occurrence of specific date
Jun
29
awarded  Popular Question
Feb
12
awarded  Scholar
Feb
12
awarded  Supporter
Feb
12
accepted Struggling with complicated date query
Feb
8
asked Struggling with complicated date query
Nov
17
awarded  Editor
Nov
17
revised Oracle Enterprise Manager read-only access for non-administrative users
added 5 characters in body
Nov
17
awarded  Student
Nov
17
asked Oracle Enterprise Manager read-only access for non-administrative users