Avatar of PHIL Sawyer
PHIL SawyerFlag 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
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Blurred text
THIS SOLUTION IS 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
Avatar of PHIL Sawyer
PHIL Sawyer
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

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

Many thanks again
Avatar of PHIL Sawyer
PHIL Sawyer
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Thanks
Avatar of awking00
awking00
Flag of United States of America image

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)
Oracle Database
Oracle Database

Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.

81K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo