END
ELSE
next_day(last_day(to_date('08/07/2003','MM/DD/')),'WED')
END
from dual;
Of course, there is a flaw in this logic. Can anyone spot it?
It's particularly nasty...
Daniel
[EMAIL PROTECTED] wrote:
>
> Ra
I know some solutions have already been posted. I will add this one however. Some of
the examples posted have the drawback that they assume your NLS date language is
English.
The formula below uses the fact that 1 January 2003 is a Wednesday.
The expression to find the first Wednesday of the mo
07/2003','MM/DD/')),'WED')
END
from dual;
Of course, there is a flaw in this logic. Can anyone spot it?
It's particularly nasty...
Daniel
[EMAIL PROTECTED] wrote:
>
> Rachel,
>
> The assumption is that the current day is alrea
x27;) from dual
SQL> /
NEXT_DAY(
-
03-SEP-03
--- [EMAIL PROTECTED] wrote:
> Hmm... much more elegant than mine, and everyone elses.
>
> Guess I better RTFM the next_day function.
>
>
>
>
>
>
> "Mercadante, Thomas F" <[EMAIL PROTECTED]>
> Sent b
03','MM/DD/')),'WED')
END
from dual;
Of course, there is a flaw in this logic. Can anyone spot it?
It's particularly nasty...
Daniel
[EMAIL PROTECTED] wrote:
>
> Rachel,
>
> The assumption is that the current day is already >= the
> Guess I better RTFM the next_day function.
>
>
>
>
>
>
> "Mercadante, Thomas F" <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> 07/22/2003 12:34 PM
> Please respond to ORACLE-L
>
>
> To: Multiple recipients of list ORACLE-L
> <[EMAIL
> 07/22/2003 01:14 PM
> Please respond to ORACLE-L
>
>
> To: Multiple recipients of list ORACLE-L
> <[EMAIL PROTECTED]>
> cc:
> Subject:RE: Job to run first Wednesday
>
>
> don't rush off to use it. I tried it, substi
everyone elses.
> >
> > Guess I better RTFM the next_day function.
> >
> >
> >
> >
> >
> >
> > "Mercadante, Thomas F" <[EMAIL PROTECTED]>
> > Sent by: [EMAIL PROTECTED]
> > 07/22/2003 12:34 PM
> > Please r
03
>
>
> --- [EMAIL PROTECTED] wrote:
> > Hmm... much more elegant than mine, and everyone elses.
> >
> > Guess I better RTFM the next_day function.
> >
> >
> >
> >
> >
> >
> > "Mercadante, Thomas F" <[EMAIL PROTECTED]>
: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> cc:
> Subject:RE: Job to run first Wednesday
>
> don't rush off to use it. I tried it, substituting August 1 and got
> September.
>
> 1* select
> next_day(last_day(to_d
TED]>
> Sent by: [EMAIL PROTECTED]
> 07/22/2003 01:14 PM
> Please respond to ORACLE-L
>
>
> To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> cc:
> Subject:RE: Job to run first Wednesday
>
> don't rush
ORACLE-L
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
cc:
Subject: RE: Job to run first Wednesday
don't rush off to use it. I tried it, substituting August 1 and got
September.
1* select
next_day(last_day(to_date('08/01/
;
>
>
>
>
>
> "Mercadante, Thomas F" <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> 07/22/2003 12:34 PM
> Please respond to ORACLE-L
>
>
> To: Multiple recipients of list ORACLE-L
> <[EMAIL PROTECTED]>
>
es.
>
> Guess I better RTFM the next_day function.
>
>
>
>
>
>
> "Mercadante, Thomas F" <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> 07/22/2003 12:34 PM
> Please respond to ORACLE-L
>
>
> To: Multiple recipient
or simply
SELECT NEXT_DAY(ADD_MONTHS(TRUNC(to_date('31-dec-2002'), 'MM')-1, 1),
'WEDNESDAY')
FROM dual
/
-Original Message-
Sent: Tuesday, July 22, 2003 3:50 PM
To: Multiple recipients of list ORACLE-L
Here's a bit of code that will always find the first wednesday of the
followin
;
>
> To: Multiple recipients of list ORACLE-L
> <[EMAIL PROTECTED]>
> cc:
> Subject:RE: Job to run first Wednesday
>
>
> Josh,
>
> With the following functions, you could probably get it to work:
>
> select
lt;[EMAIL PROTECTED]>
cc:
Subject: RE: Job to run first Wednesday
Josh,
With the following functions, you could probably get it to work:
select next_day(last_Day(sysdate),'WED') from dual
This (today) returns Wed, August 6th.
Tom Mercadante
Oracle Certif
Here's a bit of code that will always find the first wednesday of the
following month:
-- find the first wednesday of any month
alter session set nls_date_format = 'mm/dd/';
define testdate = '09/03/2003'
select
trunc(add_months('&&testdate',1),'mm') +
decode( to_char(trunc(add_month
What an interesting question.
Alright, DBMS_JOB needs a function which returns the date/time
on which the job will next run. Part of your function is to
take consider the next 31 days (in case the current run of the
job is somewhere random in the month and not on the first
Wednesday of the curre
Josh,
How about "NEXT_DAY(TRUNC(LAST_DAY(SYSDATE)+1),'WEDNESDAY')+6/24"? This
should run your DBMS_JOB's the first Wednesday of the following month at
6:00am.
Abey.
-Original Message-
Sent: Tuesday, July 22, 2003 3:14 PM
To: Multiple recipients of list ORACLE-L
Greetings,
How can I
Title: RE: Job to run first Wednesday
SELECT NEXT_DAY(ADD_MONTHS(TRUNC(SYSDATE,'MM')-1,rnum-1),'WED')
FROM (SELECT ROWNUM rnum FROM ALL_OBJECTS WHERE ROWNUM < 12)
/
for next 12 months inc
Hi, I just RTFM, squared away now.
Josh
-Original Message-
Sent: Tuesday, July 22, 2003 12:14 PM
To: Multiple recipients of list ORACLE-L
Greetings,
How can I set the interval in my dbms job to have it run on the first
Wednesday of every month? Is this even possible? I have been tryi
Josh,
With the following functions, you could probably get it to work:
select next_day(last_Day(sysdate),'WED') from dual
This (today) returns Wed, August 6th.
Tom Mercadante
Oracle Certified Professional
-Original Message-
Sent: Tuesday, July 22, 2003 3:14 PM
To: Multiple recipients
23 matches
Mail list logo