Bug: SQL window - Export query results - SQL file does not handle BLOB

Claus Pedersen

Member³
In SQl window, I have the query:
SQL:
SELECT extractValue(resource_view.res,'/Resource/XMLLob') AS blob_data,
       resource_view.any_path
FROM   resource_view;

When I use Export query results to SQL file, I get a file with a content like the following:

Code:
insert into resource_view (BLOB_DATA, ANY_PATH)
values (<BLOB>, '/sys');
insert into resource_view (BLOB_DATA, ANY_PATH)
values (<BLOB>, '/sys/acls');
<...>

This causes syntax errors when executed, Oracle can (of course) not parse the word "".

BLOB data may not be easily exported without substantial amount of PL/SQL code, but when PL/SQL Developer can not export data in a proper fashion, please notify the user.

Also, when exporting table data with CLOB's with a length exceeding 4000 characters (the max. limit of SQL string handling), the full clob is converted into a string, causing the error "ORA-01704: string literal too long" when executed.
Please notify the user also in this case, if the length of the CLOB exceeds 4000 characters
 
BLOB data can indeed not be exported as a SQL script. The export function should have displayed an error message instead of exporting like this.

The same goes for CLOB's.
 
Back
Top