| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Query Question
I modified this statement with my scenario and ran it.
create or replace function list ( field1 number ) return varchar2 as
res varchar2(2000) := null;
first boolean := true;
begin
for curs in
(select fld2 from crosstab where fld1 = field1 order by fld2 ) loop
if not first then
res := res || ', ';
else
first := false;
end if;
res := res || curs.fld2;
I got the following message from Oracle: "Proceed".
So then I ran modified with my scenario and ran it
select fld1, list(fld1) fld2
from crosstab
group by fld1
I got the following message from Oracle: "Package or Function LIST is in an invalid state".
What is up with that? Do I put them both together?
Mike Received on Fri Mar 11 2005 - 13:34:18 CST
![]() |
![]() |