Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Query To Establish Consecutive "Years"

Re: SQL Query To Establish Consecutive "Years"

From: Noodles <noodles_at_aol.com>
Date: 16 Nov 2002 12:55:10 GMT
Message-ID: <20021116075510.28420.00005883@mb-fy.aol.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US