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.

SQL*Plus Problem

Empfohlene Antworten

Veröffentlicht

Ich habe folgendes Problem:

wenn ich die Kommandos

ACCEPT variable CHAR PROMPT 'Variablenwert angeben: '

oder aber das Kommando

SET ECHO OFF

in der Kommandozeile von SQL*Plus direkt eingebe, führt SQL*Plus diese aus. Benutze ich die Kommandos aber innerhab eines Scripts und lade dieses in SQL*Plus, so bekomme ich einen ORA-00900 INVAILD SQL-Statement (bei Accept) bzw ein ORA-00922 INVAILD OR MISSING OPTION

Jmd ne Idee woran das liegt, sind doch beides gültige SQL*Plus Kommandos?

(Benutzt wird Oracle SQL*PLUS 9.2.0.1.0)

Hallo Brunswick,

ich habe es gerade getestet und bei mir fuktioniert es als Skript.

Beschreib doch mal kurz wie du das Skript aufrufst und was drumherum noch steht.

---> Mein test hat so ausgesehen:

--- datei test.sql ----

SET echo off;

ACCEPT lname CHAR prompt 'Name Eingeben:';

SELECT * FROM customers WHERE CUST_LAST_NAME = &lname;

--- ende ----

aufruf in sql*plus mit @test.sql

Hab wohl nen Fehler gemacht beim Aufruf. Mit deiner Methoda (@dateiname) funktionierts jetzt, alelrdings ignoriert er die Ausgaben im PL/SQ Teil. Kann ich keine dbms_output.put_line Asugaben machen in meinem Script (im PL/SQ Block), wenn ich das ganze im SQL*Plus laufen lasse? Wie bekomme ich denn ne Ausgabe raus (Datei oder Bildschirmausgabe)

Doch das geht,

aber dann mußt du das dbms_output mit einem Begin .. End; umrahmen.

Alternativ kannst du des aber auch mit prompt &variable ausgeben

Also im begin end rahmen ists drin, also im pl/sql block. hab aber die zeile vergessen, daher kam nix:

SET SERVEROUTPUT ON SIZE 1000000

Danke

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.