Skip to Main Content

Write Great SQL Office Hours

Free tips and training every month! Subscribe for reminders and more from Office Hours. FAQ
Dev Live Dev Intro

This month we are celebrating Developers at AskTOM. We welcome Developers of all levels of experience to join us at our FREE Developer Live events coming in August. Just click on the left to register today! If you are brand new to Database Technology, then we also have got you covered. Just click on the right for your comprehensive FREE training program to kick start your Oracle Database Development journey!

Header container

November 08

14:00 UTC   Start Times Around the World

Flashback Data Archive & SQL to Handle Overlapping Dates
In November's session, we looked at Flashback Data Archive: what it's for, how to use it, and why you can get ORA-01405 errors when querying it.

We also looked at how to use SQL to report overlapping date periods, show all the rows in a time period. This covered unpivoting and recursive solutions, comparing the performance of the two.

Highlights include:

Flashback

- 2:00 The problem of fraud and the need for auditing to detect it
- 8:10 Flashback query; how you can use this to see changes; the limiations with this
- 10:45 How to enable Flashback Data Archive
- 12:30 Flashback Data Archive demonstration

SQL: Merging overlapping dates

- 30:00 The problem: breaking overlapping from/to date periods into all the possible sub-periods
- 32:30 How to solve this; pivoting from/to dates, then generating all the subperiods
- 33:40 A walk through the SQL
- 38:40 The SQL in action; a discussion of it's performance and comparison to other methods
- 50:00 How to get exeuction plans in SQL Developer and compare two plans, side-by-side

Subscribe to give us feedback and be notified of upcoming sessions!

Experts

Your Experts
Chris Saxon
Chris Saxon, Oracle Developer Advocate for SQL    
Chris Saxon is the quizmaster for the Database Design competitions and an Oracle Developer Advocate for SQL. His job is to help you get the best out of the Oracle Database and have fun with SQL! He's also part of the answer team on Ask TOM and creates YouTube videos at The Magic of SQL channel.
Keith Laker
Keith Laker, Senior Principal Product Manager    
I have been working with Oracle data warehouse technology for over 20 years working on a wide variety of data warehouse projects both as a consultant and an onsite support engineer. I am now part of the Data Warehouse Product Management Team where I am responsible for analytical SQL. I am based in the UK at our Manchester office. A key part of my role is to work with our sales teams to brief our customers on data warehousing and analytical SQL: explaining the wide variety of new and exciting opportunities that our DW and analytical solutions can support. I regularly deliver sales training for data warehousing and analytical SQL across all our sales regions and provide competitive intelligence support across all the major data warehouse vendors.