error -1267, interval, extends
Posted in 2000
Hello,
The select is :
Select CURRENT,enc_cce,enc_ccp,201,0
from vte_enc
where
EXTEND(enc_date_dern_liv,year to day ) <
(Extend(TODAY ,year to day )-
interval (0-03) year to month )
and (enc_date_dern_liv>mdy(1,1,'0001'))
and (enc_prf_stk > 0
OR enc_prex_galva >0
OR enc_prex >0 );
And I receive this error yesterday (30/may/2000) and today :
1267: The result of a datetime computation is out of range.
The datatype of the field "enc_date_dern_liv" is "date".
I understand that when calculating, Informix obtains a date who is invalid
(30/feb/2000),
but I didn't find how to change the select to convert in the right way.
I read manuals, but it doesn't helped me a lot.
Of course, a workaroud is to test "today - 90",
which is approximatively correct,
but it's more accurate & elegant to test "today - 3 months"
Can anybody help ??
Thanks in advance
Ben