Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ausgabe einer SQL Prozedur

Empfohlene Antworten

Veröffentlicht

Hallo,

wenn ich die folgende SQL Prozedur ausführe, erhalte ich kein Ergebnis.

create or replace

PROCEDURE USER_Ausgabe IS

v_user dim_user.user_name %type;

BEGIN

SELECT user_name INTO v_user FROM dim_user

where user_name like '%testuser%';

DBMS_OUTPUT.PUT_LINE(v_user);

END;

Mit dem u.g. Befehl müsste ich mir ja zumindest die Ausgabe der Prozedur ausgeben lassen:

SELECT text

FROM all_source

WHERE name = 'user_ausgabe'

ORDER BY line

Habe ich in der SQL Prozedur irgendetwas vergessen? Die Prozedur wird lt. Developer erfolgreich kompiliert.

Gruß

Michael

Hi,

meine vorherige Antwort war zu schnell und auch gar keine Antwort auf deine Frage. Aber jetzt. :)

SELECT text

FROM all_source

WHERE name = upper( 'user_ausgabe')

ORDER BY line

Im Data Dictionary sind die Objektnamen immer groß.

EDIT:

Ok, also dann doch:

exec  USER_Ausgabe;

Dass keine Ausgabe erzeugt wird, liegt evtl. daran:

printing - Print text in Oracle SQL Developer SQL Worksheet window - Stack Overflow

Bearbeitet von carstenj

  • Autor

Danke. Damit bekomme ich das Skript ausgegeben.

Vielleicht habe ich meine Frage falsch gestellt...Wie kann ich mir das Ergebnis aus dem SQL Selects in der Prozedur ausgeben lassen? Damit ich sehe, ob das eingebettete SQL Select in der Prozedur auch das richtige Ergebnis liefert?!

VG

Michael

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.