Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Get Previous Day (ie Last Sunday)
I'm trying to write a statement in SQL to return the date of the last
sunday. ie today is
'18-NOV-2005', previous sunday was '13-NOV-2005'. I don't want to use a
function because I don't have access to create functions.
I was thinking something along the lines of: ID.INSERT_DATE = SYSDATE - DATEPART(weekday, SYSDATE) + 1
but this didn't work. Below is my full select.
SELECT
IH.ORDER_NUMBER ID.LINE_NUMBER ID.NET_AMT
Thanks,
CT
Received on Fri Nov 18 2005 - 11:33:22 CST