Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: NVL2 in PL/SQL 10g
Mark D Powell wrote:
> On Feb 4, 4:58 pm, DA Morgan <damor..._at_psoug.org> wrote: >> klabu wrote:
>> The problem is not PL/SQL it is how you are using it. >> >> SQL> DECLARE >> 2 c test.category%TYPE; >> 3 i PLS_INTEGER; >> 4 BEGIN >> 5 SELECT category, SUM(NVL2(outval, -outval, inval)) >> 6 INTO c, i >> 7 FROM test >> 8 WHERE rownum = 1 >> 9 GROUP BY category; >> 10 END; >> 11 / >> >> PL/SQL procedure successfully completed. >> >> SQL> >> -- >> Daniel A. Morgan >> University of Washington >> damor..._at_x.washington.edu >> (replace x with u to respond) >> Puget Sound Oracle Users Groupwww.psoug.org- Hide quoted text - >> >> - Show quoted text - > > Daniel, I will disagree with your response in that if NVL2 was a valid > PL/SQL function Klabu attemplted to use it correctly in an assignment > statement. As Daniel is probably aware, but did not address in his > response, most SQL functions also exist as PL/SQL functions and PL/SQL > functions can be referenced in PL/SQL assignment statements.
You are correct and I should have been clearer. I was too focused on the words "can NOT."
Someday, given the time, I'd like to test every Oracle function and add to the PSOUG website the list of which ones are not PL/SQL functions.
Unless, of course, Mark beats me too it by having his team merge them so that the distinction disappears.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Mon Feb 05 2007 - 12:04:45 CST
![]() |
![]() |