Dies ist eine statische Kopie unseres alten Forums. Es sind keine Interaktionen möglich.
This is a static copy of our old forum. Interactions are not possible.

migu

free rider

  • "migu" is male
  • "migu" started this thread

Posts: 2,643

Date of registration: Dec 11th 2001

Occupation: Developer

1

Saturday, January 10th 2004, 11:32am

SQL: dbms_output.put_line und CHAR

Ich habe folgendes Problem:

Für Blatt 11, Aufgabe 2 hole ich mir mittels Cursor aus der Tabelle state einen state_name in eine Variable s (also laut "describe state" vom Typ CHAR(14)). Diese will ich dann "einfach" mit dbms_output.put_line() ausgeben.
Doch Oracle zeigt mir den Fehler PLS-00306: wrong number or types of arguments in call to 'PUT_LINE' und ignoriert meine Anweisung (PL/SQL: Statement ignored).

Eine Konvertierung á la dbms_output.put_line(to_char(s)) geht auch nicht!

Es ist wie verhext! :( ?(
tar: Anlegen eines leeren Archivs wird feige verweigert.

This post has been edited 1 times, last edit by "migu" (Jan 10th 2004, 11:33am)


migu

free rider

  • "migu" is male
  • "migu" started this thread

Posts: 2,643

Date of registration: Dec 11th 2001

Occupation: Developer

2

Saturday, January 10th 2004, 12:24pm

RE: SQL: dbms_output.put_line und CHAR

Es war ein dummer und einfacher Fehler. :)

Mein Code vorher:

Source code

1
2
3
FOR s IN c_state LOOP
    dbms_output.put_line(s);
END LOOP;


und nachher:

Source code

1
2
3
FOR s IN c_state LOOP
    dbms_output.put_line(s.state_name);
END LOOP;


s wird nämlich implizit als Record angelegt!
tar: Anlegen eines leeren Archivs wird feige verweigert.

This post has been edited 1 times, last edit by "migu" (Jan 10th 2004, 12:24pm)