When you write INTERVAL(xx) DAY TO DAY, you are using a shorthand for:
INTERVAL(xx) DAY(2) TO DAY.
If you have more than 2 digits, therefore, you have too many digits for the type
of interval. The -201 is not a helpful error message, I'd agree; it should say
something about the number of digits exceeding the number acceptable for the
type. Anyway, use the longhand notation with 3 in parentheses and you'll be OK.
Yours,
Jonathan Leffler (jleffler@visa.com) #include <bother.ms-exchange.h>
>----------
From: ccremid[SMTP:ccremid@saadev.saa.noaa.gov]
>Can any of you, Informix gurus, provide an explanation why:
>SELECT current year to day - interval(99) day to day
> from systables where tabid = 1
>Works just fine, but
>SELECT current year to day - interval(100) day to day
O from systables where tabid = 1
>Fails with error -201 (Syntax error)