Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Query To Establish Consecutive "Years"
It might be doable in regular SQL but PL/SQL might be easier.
Maybe a subquery using the having qualifier for a count of payments > 0 and where the year in ((yea)r or( year+1) or (year+2)) ?
Maybe use PL/SQL to pull your data out, sort by year ascending and then step through the "trios" of year records to satisfy the "3 consevitive year" requirement.
My 2 cents,
Cliff
Toddler Rule #2: If it looks like my toy, it IS my toy. If it's broken it's
yours.
Received on Sat Nov 16 2002 - 06:55:10 CST