Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Please Help with PL/SQL Function Error PLS-00950

Re: Please Help with PL/SQL Function Error PLS-00950

From: Ken Denny <ken_at_kendenny.com>
Date: Wed, 13 Mar 2002 17:58:16 GMT
Message-ID: <Xns91D08640BE7A9kendenny@65.82.44.7>


privatebenjamin_at_hushmail.com (April) wrote in news:21e9f79.0203130821.7309aac6_at_posting.google.com:

> When I saw how simple your changes were, I wondered myself why mine
> were so convoluted. But I realized that the reason I did all that
> to_char(to_date(to_char etc. was
>
> 1. due to the date formatting on the server. I was receiving error
> messages unless I converted to dd-MON-yyyy and

Shouldn't be a problem.

> 2. in order to properly compare the cont_reqd_isdate(dd-mm-yyyy) and
> the tmpInterestDate (mm-yyyy). The mm-yyyy defaulted to a dd of 01, so
> the cont_reqd_isDate would never be equal to the tmpInterestDate when
> they were in the same month, which was one of my objectives.

Oh sorry. That could be a problem with my simplification. Two ways to handle that.

  1. Make tmpInterestDate the last day of the month: tmpInterestDate DATE := ADD_MONTHS(TO_DATE(p_Month||p_Year,'MMYYYY'),1)-1; (Add one month then subtract one day). You'll also need to strip the time portion off tmpISDate when comparing it to tmpInterestDate: IF TRUNC(tmpISDate) <= tmpInterestDate THEN
  2. Strip the day portion from tmpISDate before comparing to tmpInterestDate: IF TO_DATE(TO_CHAR(tmpISDate,'YYYYMM'),'YYYYMM') <= tmpInterestDate THEN
-- 
Ken Denny
http://www.kendenny.com/

My wife keeps complaining I never listen to her ...or something like that.
Received on Wed Mar 13 2002 - 11:58:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US