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: error: PLS-00201: identifier 'UPDATEXML' must be declared

Re: error: PLS-00201: identifier 'UPDATEXML' must be declared

From: Gertjan <gvheijst_at_xs4all.nl>
Date: 29 Jan 2007 00:28:37 -0800
Message-ID: <1170059317.431140.301190@s48g2000cws.googlegroups.com>


Hi Maxim,

Thanks for solving this riddle! Is there perhaps a list of other functions that have the same limitation? (I don't have access to metalink unfortunately)

Gertjan

On 28 jan, 12:08, Maxim Demenko <mdeme..._at_gmail.com> wrote:
> Gertjan schrieb:
>
>
>
>
>
> > Hi Maxim - and others -
>
> > Things are getting stranger... This test succeeds on my system as
> > well. It seems that UPDATEXML is recognised when called directly from
> > the SQL*PLUS prompt, but not if it is called in a function that is
> > called from SQL*PLUS prompt ...
>
> > for example: the query:
>
> > SELECT UPDATEXML(XMLType.CreateXML(UDFValues), '/lokaleMetaData/
> > metadataWaarde/text()', '45') FROM tProcessen WHERE procesnummer =
> > 'B0009';
>
> > works ok, but the function
>
> > CREATE OR REPLACE FUNCTION getXMLValue
> > return varchar2
> > IS
> > clobval Clob;
> > xmlval XMLType;
> > BEGIN
> > SELECT UDFValues INTO clobval FROM tProcessen WHERE procesnummer =
> > 'B0009';
> > xmlval := XMLType.CreateXML(clobval);
> > xmlval := UPDATEXML(xmlval, '/lokaleMetaData/metadataWaarde/text()',
> > '45');
> > RETURN xmlval.getStringVal;
> > END;
>
> > gives the compilation error ....
>
> > I get this error both when the function is loaded from a script and
> > when i paste the function directly into SQL*PLUS
>
> > Thanks for any suggestion...
>
> > GertjanThe problem is - updatexml can be used only within sql context (that
> means, pl sql assignment like variable := value can't be recognized).
> To get it working, you can rewrite your function as
>
> SELECT UPDATEXML(xmlval, '/lokaleMetaData/metadataWaarde/text()','45')
> INTO xmlval FROM DUAL;
>
> You can also look on the Note 480368.996 on Metalink, there is
> mentioned, enhancement request 2295055 which deals with this problem,
> but i assume, it has very low priority, since the Note is dated as of
> November 2003, and the same behaviour is still on 10.2.0.3
>
> Best regards
>
> Maxim- Tekst uit oorspronkelijk bericht niet weergeven -- Tekst uit oorspronkelijk bericht weergeven -
Received on Mon Jan 29 2007 - 02:28:37 CST

Original text of this message

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