› Fóruns › Banco de dados Oracle › ORA-04093: references to columns of type LONG are not allowe › ORA-04093: references to columns of type LONG are not allowe
Uma coluna chamada TAMANHO de tipo LONG, parece que quem criou as tabelas confundiu os tipos de dados…
No Oracle o tipo LONG grava textos grandes, não é um tipo numérico como nas outras linguagens de programação.
Verifique se está correto o tipo desta coluna… Se estiver correto, não seria melhor usar CLOB?
Se ainda assim tiver que usar o LONG, fique atento às restrições (no 10g… você não disse a versão do teu banco):
Trigger Restrictions on LONG and LONG RAW Datatypes
LONG and LONG RAW datatypes in triggers are subject to the following restrictions:
* A SQL statement within a trigger can insert data into a column of LONG or LONG RAW datatype.
* If data from a LONG or LONG RAW column can be converted to a constrained datatype (such as CHAR and VARCHAR2), then a LONG or LONG RAW column can be referenced in a SQL statement within a trigger. The maximum length for these datatypes is 32000 bytes.
* Variables cannot be declared using the LONG or LONG RAW datatypes.
* :NEW and 😛 ARENT cannot be used with LONG or LONG RAW columns.
Fonte: http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10795/adfns_tr.htm#1006604
Então, uma forma de “resolver”:
http://forums.oracle.com/forums/thread.jspa?threadID=856638
recomendação real:
mude o tipo pra CLOB
mude o tipo pra CLOB
mude o tipo pra CLOB
mude o tipo pra CLOB
😆