getting lenght of an XMLTYPE column
FormsMar 6 2009 — edited Mar 6 2009Hi 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