Koivu, Lisa wrote:

>
>
> but I can't figure out why this is executing the way it is.
>
> The code meets the criteria for executing the THEN statement.  I step
> through it and watch it happen.
> However it then falls into the ELSE and decrements the index.  It
> doesn't even delete the two records, it skips to line 10.  I wrote the
> code  to either execute THEN or execute ELSE...
>
> It may be pre-coffee boneheadedness, but I don't know why this is.  If
> anyone has any insight or sees anything wrong with this, please speak
> up..
>
> Thanks everyone
>
>  1       IF (mtab_ps_price_range(mn_ps_index) <>
> mtab_pl_price_min(mn_pl_index)
>  2         OR mtab_ps_price_range(mn_ps_index) IS NULL)
>  3       THEN
>  4         mtab_ps_price_range(mn_ps_index) :=
> to_char(mtab_pl_price_min(mn_pl_index),'FM$9,999,999.00');
>  5       ELSE
>  6       -- Delete record, price hasn't changed.
>  7       -- Don't increment the product_search counter (pn_ps_index)
>  8         mtab_ps_prod_id.DELETE (mn_ps_index);
>  9         mtab_ps_price_range.DELETE (mn_ps_index);
>  10        mn_ps_index := mn_ps_index - 1;
>  11      END IF;
>
> Lisa Rutland Koivu
> Oracle Database Administrator
> Qode.com
> 4850 North State Road 7
> Suite G104
> Fort Lauderdale, FL  33319
>
> V: 954.484.3191, x174
> F: 954.484.2933
> C: 954.658.5849
> http://www.qode.com
>
> "The information contained herein does not express the opinion or
> position of Qode.com and cannot be attributed to or made binding upon
> Qode.com."

  Hi Lisa

  Perhaps the extra parenthesis will help.

       IF ((mtab_ps_price_range(mn_ps_index) <>
mtab_pl_price_min(mn_pl_index))
          OR mtab_ps_price_range(mn_ps_index) IS NULL)

Jeff

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jeff Landers
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to