This content has been marked as final. Show 9 replies
<tt>if</tt> and <tt>case</tt> are branches, not loops.
I have to write a Process whereWhere what?
Like some thing Below . I get error when using "or"When you get an error it is of infinite utility to anyone trying to help you if you actually say what the error is...
is there any other way I can handle this Situation ?Probably. However as we don't know what it does or what is wrong with it it's difficult to make any further comment at this juncture.
it's most likely that the error is caused by the fact that in your code you are depending on an implicit date conversion.
If you know what the date format is, eg 'DD-MM-YYYY', use the correct format mask like:
if lower(V_AG_ORG) not like lower(:P17_AG_ORG ) or lower(V_AG_DNUM) not like lower(:P17_AG_DNUM) or lower(V_DTSUPVREJ) not like lower(:P17_DTSUPREJ) or lower(V_AG_DNUM_SUPP) not like lower(:P17_AG_DNUM_SUPP) or lower(V_CSS_FIRM_NUM) not like lower(:P17_FIRM_NUM) or to_date(V_SERVTO, 'DD-MM-YYYY') not like to_date(:P17_SERVTO, 'DD-MM-YYYY') or to_date(V_SERVFROM, 'DD-MM-YYYY') not Like to_date(:P17_SERVFROM, 'DD-MM-YYYY') then proc_snapshot(:P17_perf_eval_rtng_id); end if;
This is a Pl/SQl process where I have to check if any Items are getting updated by the User. If the Items is getting Updated I have to call the procedure to take a snapsho of the Records . The Procedure runs fine successfully inserts the records.
I am just not sure to write the condition on how to check if any of the item on the Page is getting updated. I got to run this procedure even of one Item gets Updated.
The procedure runs fine if I comment out the Or parts like below .
if lower(V_AG_ORG) not like lower(:P17_AG_ORG ) -- or lower(V_AG_DNUM) not like lower(:P17_AG_DNUM) -- or lower(V_DTSUPVREJ) not like lower(:P17_DTSUPREJ) -- or lower(V_AG_DNUM_SUPP) not like lower(:P17_AG_DNUM_SUPP) -- or lower(V_CSS_FIRM_NUM) not like lower(:P17_FIRM_NUM) -- or to_date(V_SERVTO) not like to_date(:P17_SERVTO) -- or to_date(V_SERVFROM) not Like to_date(:P17_SERVFROM) then proc_snapshot(:P17_perf_eval_rtng_id); end if; end;
Why not just have a flag on the page that gets set when ANY of these items are updated? Then you can just to see if the flag is set and do your process? Using NOT LIKE with OR is not the best approach..
EVRM , you seem to be right. The date conversion seems to be causing the issues.
<font size=6>WHAT IS THE ERROR MESSAGE?</font>
the users want to see who made the changes . So we need to capture the Record before the user changes it and keep it for their Review from Different Report.
The Error does not show . The Process gets compiled and saved. Its when Trying to save the page that I get Error. It looks like to_date conversion seems to cause the Issue. Taking it off does successfully run the procedure. Not sure if its right approach to check with to_date conversion on the Items.
Lucy Discover wrote:That would be the error we're interested in.
The Error does not show . The Process gets compiled and saved. Its when Trying to save the page that I get Error.