?
Solved

Return the last saturday date regardless of when the sql was ran in any given week

Posted on 2015-01-15
1
Medium Priority
?
238 Views
Last Modified: 2015-01-15
Guys, I want to return the date of the last saturday regardless of when the code was ran.

ie today is 15/01/2015 so last saturdays date is 10/01/2015.

I want to run this any day of the week but the result has to be the same so when I run the code next week on say the 20/01/2015 the saturday to be returned is the 17/01/2015

Any Help

Thanks
0
Comment
Question by:DarrenJackson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
DarrenJackson earned 0 total points
ID: 40550989
just worked it out

TRUNC(SYSDATE, 'IW') -2
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question