troubleshooting Question

Oracle SQL Loop with date change

Avatar of mehul bhakta
mehul bhakta asked on
SQL
1 Comment1 Solution107 ViewsLast Modified:
hello all

I create this stage table with how customers looked on '01-JAN-2016', this table then goes through to other tables to see how they looked on that day. for example were they activated for online use on '01-JAN-2016', how did they pay etc.

I then dump all that data into one table with a from_date with the day they joined the company and a default to_date of '31-DEC-9999', then I repeat this process for '02-JAN-2016' and compare the two tables, if there was a change I'd make the to_date of line one '01-JAN-2016' so the from_date of line two is '02-JAN-2016' and now the to_date is '31-DEC-9999'.

I want to be able to repeat this process until the present day.

is this possible in SQL?

Many Thanks

Mac
example-customer.xlsx
ASKER CERTIFIED SOLUTION
ste5an
Senior Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros