RE: Job to run first Wednesday

2003-07-22 Thread Orr, Steve
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

RE: Job to run first Wednesday

2003-07-22 Thread Jacques Kilchoer
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

RE: Job to run first Wednesday

2003-07-22 Thread Rudy Zung
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

RE: Job to run first Wednesday

2003-07-22 Thread Jared . Still
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

RE: Job to run first Wednesday

2003-07-22 Thread Igor Neyman
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

RE: Job to run first Wednesday

2003-07-22 Thread Josh Collier
> 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

RE: Job to run first Wednesday

2003-07-22 Thread Rachel Carmichael
> 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

RE: Job to run first Wednesday

2003-07-22 Thread Rachel Carmichael
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

RE: Job to run first Wednesday

2003-07-22 Thread Rachel Carmichael
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]>

Re: Job to run first Wednesday

2003-07-22 Thread Don Yu
: 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

Re: Job to run first Wednesday

2003-07-22 Thread Daniel Fink
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

RE: Job to run first Wednesday

2003-07-22 Thread Jared . Still
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/

RE: Job to run first Wednesday

2003-07-22 Thread Igor Neyman
; > > > > > > "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]> >

RE: Job to run first Wednesday

2003-07-22 Thread Mercadante, Thomas F
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

RE: Job to run first Wednesday

2003-07-22 Thread Kevin Toepke
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

RE: Job to run first Wednesday

2003-07-22 Thread Rachel Carmichael
; > > 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

RE: Job to run first Wednesday

2003-07-22 Thread Jared . Still
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

Re: Job to run first Wednesday

2003-07-22 Thread Jared . Still
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

RE: Job to run first Wednesday

2003-07-22 Thread Rudy Zung
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

RE: Job to run first Wednesday

2003-07-22 Thread Abey Joseph
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

RE: Job to run first Wednesday

2003-07-22 Thread Jamadagni, Rajendra
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

RE: Job to run first Wednesday

2003-07-22 Thread Josh Collier
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

RE: Job to run first Wednesday

2003-07-22 Thread Mercadante, Thomas F
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