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.

Execute Immediate und CLOB

Empfohlene Antworten

Veröffentlicht

Hallo,

weiß jemand eine Möglichkeit wie ich einen CREATE TABLE der ca 13000 Zeichen lang ist und in einem CLOB liegt mit einem EXECUTE IMMEDIATE ausführen kann ?

Ist eine Oracle 11g DB....

Danke schonmal für Ideen ;)

Wenn ich den VARCHAR2 Wert über 4000 setze kommt der Fehler:

"ORA-01461: Ein LONG-Wert kann nur zur Einfügung in eine LONG-Spalte gebunden werden"

Klar, denn Du gehst damit in den SQL Kontext und dort sind wieder nur 4000 Byte erlaubt. Du musst das komplett im PL/SQL Kontext machen:

declare

 l_myClob clob;

 l_buf varchar2(32000);

 l_amount binary_integer:=1;

begin

 select myClobColumn,dbms_lob.getlength(myClobColumn) into l_myClob,l_amount from clobTable where id=1;

 dbms_lob.read(l_myClob,l_amount,1,l_buf);

 dbms_output.put_line(l_buf);

 execute immediate l_buf;

end;

/

Die Doku dazu findest Du hier

Dim

hat geklappt 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.