Re: Filter operation

  • From: Nigel Thomas <nigel.cl.thomas@xxxxxxxxxxxxxx>
  • To: exriscer@xxxxxxxxx
  • Date: Tue, 23 Mar 2010 15:12:13 +0000

Is it evaluating SYSDATE for every row (because the result of SYSDATE
changes over the course of the execution)? Might be better to put the range
bounds into variables - eg

BEGIN
   :end_date := add_months(trunc(sysdate, 'MM'), -1);
 :start_date := trunc(sysdate, 'MM');
END;

and then change your predicates:

    WHERE MF.F_PERIOD >= :end_date
      AND MF.F_PERIOD < :start_date

Regards Nigel

On 23 March 2010 14:44, LS Cheng <exriscer@xxxxxxxxx> wrote:

> Any suggestions?
>
> Thanks
>
> --
> LSC
>
>
>

Other related posts: