› Fóruns › SQL e PL/SQL › Problemas com campos LOB. › Problemas com campos LOB.
Pessoal, os campos CLOB e BLOB podem sim ser visualizados no SQL*Plus, Ao contrário do afirmado pelo Márcio na resposta acima. Desde que ele seja local.
O Problema é com o acesso REMOTO a uma tabela q tenha o campo LOB-Large Object) (seja ele um BLOB-Binário ou CLOB- Caracter).
Existem restrições com os campos do tipo LOB para acessos remotos. Veja um pedaço do manual do Oracle:
LOB columns are subject to the following restrictions:
Distributed LOBs are not supported. Therefore, you cannot use a remote locator in SELECT or WHERE clauses of queries or in functions of the DBMS_LOB package.
The following syntax is not supported for LOBs:
SELECT lobcol FROM table1@remote_site;
INSERT INTO lobtable SELECT type1.lobattr FROM
table1@remote_site;
SELECT DBMS_LOB.getlength(lobcol) FROM table1@remote_site;
(This statement produces error: ORA-22992 cannot use LOB locators selected from remote tables.)
However, you can use a remote locator in others parts of queries that reference LOBs. The following syntax is supported on remote LOB columns:
CREATE TABLE t AS SELECT * FROM table1@remote_site;
INSERT INTO t SELECT * FROM table1@remote_site;
UPDATE t SET lobcol = (SELECT lobcol FROM table1@remote_site);
INSERT INTO table1@remote_site …
UPDATE table1@remote_site …
DELETE FROM table1@remote_site …
Quando for local o funcionamento é normal. Veja os exemplos:
SQL> create table teste_lob (chave number primary key, camplo_lob clob);
Tabela criada.
SQL> insert into teste_lob values (1,’valor dentro do campo’);
1 linha criada.
SQL> select * from teste_lob;
CHAVE
CAMPLO_LOB
1
valor dentro do campo
SQL> select * from teste_lob;
CHAVE
CAMPLO_LOB
1
valor dentro do campo
SQL>
Vc vai ter que ler o manual na parte que fala da utilização do DBMS_LOB.
Aí vai um link para um manual que tm algumas dicas:
http://www.lc.leidenuniv.nl/awcourse/or … l04mng.htm
Espero ter ajudado.
Abraços.