Subject | Absolutely boring... |
---|---|
Author | Francisco Antonio Vieira Souza |
Post date | 2004-05-24T11:29:03Z |
Could anybody tell me why I have this boring error when trying to insert
anything in my table, just 2 fields are NOT NULL, which I fill properly
(considering the foreign key) BUT this error comes (the problem is that can
be one of three things wrong, but which one?):
Arithmetic overflow or division by zero has occored.
arithmetic exception, numeric overflow, or string truncation
My table:
SET SQL DIALECT 3;
SET NAMES ISO8859_1;
CREATE TABLE INSUMOS (
CODIGO VARCHAR(25) NOT NULL,
NOME D_NOME /* VARCHAR(50) */,
FORNECEDOR D_CNPJ /* VARCHAR(18) */ NOT NULL,
UNIDADE VARCHAR(10),
ESTOQUEMINIMO NUMERIC(12,2) DEFAULT 1.0,
TOTALENTRADA NUMERIC(12,2) DEFAULT 1.0,
TOTALSAIDA NUMERIC(12,2) DEFAULT 0.0,
ESTOQUE_ATUAL NUMERIC(12,2) DEFAULT 1.0,
ULTIMA_NOTA D_NOTAFISCAL /* INTEGER */,
ULTIMA_ENTRADA D_DATA /* DATE */,
ULTIMA_SAIDA D_DATA /* DATE */,
USA_MEDIDA CHAR(3) DEFAULT 'Sim',
USA_QUANTIDADE CHAR(3) DEFAULT 'Sim',
TIPO_PRODUTO VARCHAR(10) DEFAULT 'Inteiro',
VALOR_CUSTO D_MOEDA /* NUMERIC(16,5) DEFAULT 0.00 */ /*
NUMERIC(16,8) */ DEFAULT 0.00,
VALOR_VENDA D_MOEDA /* NUMERIC(16,5) DEFAULT 0.00 */ /*
NUMERIC(16,8) */ DEFAULT 0.00,
COEFICIENTE_TAMANHO D_COEFICIENTE /* NUMERIC(8,5) */,
COEFICIENTE_ERRO D_COEFICIENTE /* NUMERIC(8,5) */,
VALOR_ICMS D_MOEDA /* NUMERIC(16,5) DEFAULT 0.00 */ /*
NUMERIC(16,8) */ DEFAULT 0.00,
VALOR_IPI D_MOEDA /* NUMERIC(16,5) DEFAULT 0.00 */ /*
NUMERIC(16,8) */ DEFAULT 0.00,
DATA_CADASTRO D_DATA /* DATE */
);
ALTER TABLE INSUMOS ADD PRIMARY KEY (CODIGO, FORNECEDOR);
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004
anything in my table, just 2 fields are NOT NULL, which I fill properly
(considering the foreign key) BUT this error comes (the problem is that can
be one of three things wrong, but which one?):
Arithmetic overflow or division by zero has occored.
arithmetic exception, numeric overflow, or string truncation
My table:
SET SQL DIALECT 3;
SET NAMES ISO8859_1;
CREATE TABLE INSUMOS (
CODIGO VARCHAR(25) NOT NULL,
NOME D_NOME /* VARCHAR(50) */,
FORNECEDOR D_CNPJ /* VARCHAR(18) */ NOT NULL,
UNIDADE VARCHAR(10),
ESTOQUEMINIMO NUMERIC(12,2) DEFAULT 1.0,
TOTALENTRADA NUMERIC(12,2) DEFAULT 1.0,
TOTALSAIDA NUMERIC(12,2) DEFAULT 0.0,
ESTOQUE_ATUAL NUMERIC(12,2) DEFAULT 1.0,
ULTIMA_NOTA D_NOTAFISCAL /* INTEGER */,
ULTIMA_ENTRADA D_DATA /* DATE */,
ULTIMA_SAIDA D_DATA /* DATE */,
USA_MEDIDA CHAR(3) DEFAULT 'Sim',
USA_QUANTIDADE CHAR(3) DEFAULT 'Sim',
TIPO_PRODUTO VARCHAR(10) DEFAULT 'Inteiro',
VALOR_CUSTO D_MOEDA /* NUMERIC(16,5) DEFAULT 0.00 */ /*
NUMERIC(16,8) */ DEFAULT 0.00,
VALOR_VENDA D_MOEDA /* NUMERIC(16,5) DEFAULT 0.00 */ /*
NUMERIC(16,8) */ DEFAULT 0.00,
COEFICIENTE_TAMANHO D_COEFICIENTE /* NUMERIC(8,5) */,
COEFICIENTE_ERRO D_COEFICIENTE /* NUMERIC(8,5) */,
VALOR_ICMS D_MOEDA /* NUMERIC(16,5) DEFAULT 0.00 */ /*
NUMERIC(16,8) */ DEFAULT 0.00,
VALOR_IPI D_MOEDA /* NUMERIC(16,5) DEFAULT 0.00 */ /*
NUMERIC(16,8) */ DEFAULT 0.00,
DATA_CADASTRO D_DATA /* DATE */
);
ALTER TABLE INSUMOS ADD PRIMARY KEY (CODIGO, FORNECEDOR);
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004