Subject | Strange "bug(?)" in FB 1.0 |
---|---|
Author | Carlos H. Cantu |
Post date | 2003-07-17T16:12Z |
In a procedure I have :
DECLARE VARIABLE CPAI VARCHAR(8);
so in the body of the procedure
...
CPAI = NULL;
...
insert into filhos (mae, dtnasc, filho, nome, sexo, natimorto, grausangue, raca, PAI, peso)
select :Brinco, :dData, F_brinco(e.Bezerro1), e.barn1, e.sexo1, e.natm1, e.grausangue,
e.raca, :CPAI, e.peso1
from edvaps e
where (e.brinco = :brinco) and (e.ps = 'P') and (e.data = :dData);
when this insert is executed I get :
Incompatible column/host variable data type.
Dynamic SQL Error.
SQL error code = -303.
arithmetic exception, numeric overflow, or string truncation.
If I replace CPAI with NULL, like :
insert into filhos (mae, dtnasc, filho, nome, sexo, natimorto, grausangue, raca, PAI, peso)
select :Brinco, :dData, F_brinco(e.Bezerro1), e.barn1, e.sexo1, e.natm1, e.grausangue,
e.raca, NULL, e.peso1
from edvaps e
where (e.brinco = :brinco) and (e.ps = 'P') and (e.data = :dData);
the statament runs fine !
It seems like a FB bug. If so, any ideas or any workaround ?
Tested with FB 1.02.908 and Win2K.
Any help will be apreciated.
[]s
Carlos
WarmBoot Informatica - http://www.warmboot.com.br
FireBase - http://www.FireBase.com.br
DECLARE VARIABLE CPAI VARCHAR(8);
so in the body of the procedure
...
CPAI = NULL;
...
insert into filhos (mae, dtnasc, filho, nome, sexo, natimorto, grausangue, raca, PAI, peso)
select :Brinco, :dData, F_brinco(e.Bezerro1), e.barn1, e.sexo1, e.natm1, e.grausangue,
e.raca, :CPAI, e.peso1
from edvaps e
where (e.brinco = :brinco) and (e.ps = 'P') and (e.data = :dData);
when this insert is executed I get :
Incompatible column/host variable data type.
Dynamic SQL Error.
SQL error code = -303.
arithmetic exception, numeric overflow, or string truncation.
If I replace CPAI with NULL, like :
insert into filhos (mae, dtnasc, filho, nome, sexo, natimorto, grausangue, raca, PAI, peso)
select :Brinco, :dData, F_brinco(e.Bezerro1), e.barn1, e.sexo1, e.natm1, e.grausangue,
e.raca, NULL, e.peso1
from edvaps e
where (e.brinco = :brinco) and (e.ps = 'P') and (e.data = :dData);
the statament runs fine !
It seems like a FB bug. If so, any ideas or any workaround ?
Tested with FB 1.02.908 and Win2K.
Any help will be apreciated.
[]s
Carlos
WarmBoot Informatica - http://www.warmboot.com.br
FireBase - http://www.FireBase.com.br