Tento funguje:
DECLARE
aLine VARCHAR2(100);
BEGIN
FOR PyramidLevel IN 0..25 LOOP
aLine := NULL;
FOR i IN 0..PyramidLevel-1 LOOP
aLine := aLine || CHR(i+65);
END LOOP;
FOR i IN REVERSE 0..PyramidLevel LOOP
aLine := aLine || CHR(i+65);
END LOOP;
aLine := LPAD(aLine, 26+PyramidLevel);
DBMS_OUTPUT.PUT_LINE('_'||aLine);
END LOOP;
END;
_ A
_ ABA
_ ABCBA
_ ABCDCBA
_ ABCDEDCBA
_ ABCDEFEDCBA
_ ABCDEFGFEDCBA
_ ABCDEFGHGFEDCBA
_ ABCDEFGHIHGFEDCBA
_ ABCDEFGHIJIHGFEDCBA
_ ABCDEFGHIJKJIHGFEDCBA
_ ABCDEFGHIJKLKJIHGFEDCBA
_ ABCDEFGHIJKLMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNONMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNOPONMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNOPQPONMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNOPQRQPONMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNOPQRSRQPONMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNOPQRSTSRQPONMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNOPQRSTUTSRQPONMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNOPQRSTUVUTSRQPONMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNOPQRSTUVWVUTSRQPONMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNOPQRSTUVWXWVUTSRQPONMLKJIHGFEDCBA
_ ABCDEFGHIJKLMNOPQRSTUVWXYXWVUTSRQPONMLKJIHGFEDCBA
_ABCDEFGHIJKLMNOPQRSTUVWXYZYXWVUTSRQPONMLKJIHGFEDCBA
Vypadá jako DBMS_OUTPUT.PUT_LINE()
ořezává znaky úvodní mezery (alespoň v mém TOAD), takže jsem dal _
na začátku.