Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getting lenght of an XMLTYPE column

FormsMar 6 2009 — edited Mar 6 2009
Hi Gurus,

I have an XMLTYPE column a in table temp. I am trying to find the length of the file and following is my approach.

Please help me in resolving it. The sql in TOAD works without any problem.

declare
cursor c1 is
select dbms_lob.getlength(x.a.getclobval()) xml_string
from temp x;
a integer;
begin
for v1 in c1 LOOP
a:=dbms_lob.getlength(v1.xml_string);
dbms_output.put_line(a);
end loop;
exception
when others then
dbms_output.put_line(SQLERRM);
end;

Error at line 1
ORA-06550: line 8, column 12:
PLS-00306: wrong number or types of arguments in call to 'GETLENGTH'
ORA-06550: line 8, column 9:
PL/SQL: Statement ignored
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 3 2009
Added on Mar 6 2009
1 comment
4,553 views