Avatar of PHIL Sawyer
PHIL Sawyer
Flag for United Kingdom of Great Britain and Northern Ireland asked on

using RECURSIVE WITH statement - using oracle 11g

Hello
Another question similar to one posted earlier today - angelIII helped me out earlier but this one is slightly different and best explained by seeing the attached - see cell C108 as for the required answer.

I have a table with 2 columns date and amount - again see attached for required outcome.

Regards
recursive2.xls
Oracle Database

Avatar of undefined
Last Comment
awking00

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Guy Hengel [angelIII / a3]

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
PHIL Sawyer

ASKER
Hello
This one works if I change t.date, -11 to
t.date, -12

Many thanks again
PHIL Sawyer

ASKER
Thanks
awking00

Not sure but I'm thinking that, in order to match your spreadsheet line for line the join should be on add_months(p.date,-1) = add_months(t.date,-12)
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes