Retrieve date of a specific day in a prior week

From: <ste.parker_at_gmail.com>
Date: 2 Mar 2006 02:46:37 -0800
Message-ID: <1141296397.607004.47750_at_z34g2000cwc.googlegroups.com>



Hi, I'm stuggling with some sql where I need to pick up the date of the tuesday of the previous week for any given date, for example:

If the date is 02/02/06 I would need to have 31/01/06 returned (the previous Tuesday)
If the date is 05/02/06 I would need to have 31/01/06 returned (the previous Tuesday)
If the date is 08/02/06 I would need to have 07/02/06 returned (the previous Tuesday)
etc etc.

Is there a simple way using plain oracle sql to achieve this?

thanks for any help

-- 
[ste]
Received on Thu Mar 02 2006 - 11:46:37 CET

Original text of this message