- Este tópico contém 5 respostas, 3 vozes e foi atualizado pela última vez 14 anos atrás por
DBA_LUCAS.
-
AutorPosts
-
23 de novembro de 2011 às 10:58 pm #101773
DBA_LUCAS
ParticipanteBoa tarde Galera !
Estou com um problema a respeito de converções , estou dando um select em um campo do tipo LONG RAW e inserindo em outra tabela em um campo tambem do tipo LONG RAW … porem estou me deparando com o seguinte problema:
ORA-22835: Buffer muito pequeno para converção de clob em char ou de blob em RAW (real: 11451, maximo: 2000)
alguem tem alguma ideia ???
24 de novembro de 2011 às 8:11 pm #101783diegolenhardt
Participantenao da pra fazer com create table as select ?
24 de novembro de 2011 às 8:17 pm #101784DBA_LUCAS
ParticipanteNão porque as tabelas ja existem e ambas tem um campo do tipo long raw , quero dar select em um e inserir no outro …. mas esta dando esse problema não sei porque…
24 de novembro de 2011 às 8:29 pm #101785diegolenhardt
ParticipantePesquisei aqui cara, encontrei no blog do tomkyte.. segundo ele nao dá…sem ter que escrever alguma emnjambracao em C, Java, etc…
In Oracle8i, releases 8.0 and up, you should not be using LONG RAW. Both LONG and LONG
RAW are only provided for backwards compatibility — they are deprecated datatypes.You should be using blob — then its as easy as above (create table as select). LONGS
and LONG RAWS come with many many limits (no use in WHERE clause, no insert into select
LONG, no create table as SELECT, no chance of manipulation in PLSQL — only in 3gls, no
replication, etc, etc, etc). BLOBS and CLOBS do not suffer from these limits.To copy a long raw into another table without writing a program in C or VB or Java or
some other 3gl you can:o export the table (emp in your example)
o rename the table emp to using the RENAME command
o import the export you just createdTo merge them (say you wanted to take the table EMP and the table NAME and have EMP have
all of the records at the end) you would:o export that table NAME
o drop table NAME
o rename EMP to NAME
o import with ignore=y to add the rows to NAME
o rename NAME to EMPremember to set BUFFER really large for the export and import to avoid issues with exp
and imp and large columns.With LONGS (not LONG RAWS) you can use the sqlplus copy command as well, see
http://asktom.oracle.com/~tkyte/Misc/MoveLongs.html
for details.
http://asktom.oracle.com/pls/asktom/f?p … 8223421081
24 de novembro de 2011 às 8:29 pm #101786eversonpiza
ParticipanteComo vc esta fazendo isso, é via PL/SQL?
Se sim, qual o tipo da variável que esta usando?
24 de novembro de 2011 às 8:59 pm #101787DBA_LUCAS
ParticipanteObrigado pela ajuda …. irei manipular pelo delphi ….
-
AutorPosts
- Você deve fazer login para responder a este tópico.