Aqui les dejo el codigo. donde esta lo de rojo me sale el error.
espero me puedan ayudar.
Código HTML:
LOOP
auxcab:=''SELECT'';
LOOP
IF auxcab<>''SELECT'' THEN
auxcab:=auxcab||'','';
END IF;
auxcab:=auxcab||'' o''||contnivel2||''.name AS neviel''||contnivel2;
EXIT WHEN contnivel2=aux;
contnivel2=contnivel2+1;
END LOOP;
LOOP
contnivel2=contnivel2+1;
[COLOR="Red"]auxcab:=auxcab||'',----- AS nivel''||contnivel2;[/COLOR]
EXIT WHEN contnivel2>=contnivel;
END LOOP;
EXIT WHEN contnivel=contnivel;
contnivel1=contnivel1+1;
aux:=aux+1;
END LOOP;