Subject Re: arithmetic exception, numeric overflow, or string truncation
Author Roberto Freitas
Thanks, Adam, with the built in substring function it's all fine.
I've looked for built in functions on www.firebirdsql.org but I
couldn't find it yet. Where can I find documentation about all built
in Firebird 1.5 functions?

--- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
>
> --- In firebird-support@yahoogroups.com, "Roberto Freitas"
> <solanofreitas@> wrote:
> >
> > Hi, I am using FireBird 1.5 with Windows.
> > I submit any of these sentences using isql or other tool:
> >
> > select * from doc where substr(doc3000,1,3)='ERR'
> > select * from doc where f_substr('ERR',doc3000)>0
> >
> > doc3000 is type Varchar, size 3000, CharSet Win 1252, Collate PXW-

> > INTL850
> > substr is a external function from ib_udf
> > f_substr is a external function from FreeUDFLib
> >
> > Unfortunatelly I get this error message:
> > statement failed, SQLCODE = -802
> > arithmetic exception, numeric overflow, or string truncation
> >
> > When using same sentences with a smaller field it's OK, but with
a
> > large field like this one (varchar 3000) it fails.
> > What's this problem about and what can I do to solve it?
> >
>
> How is f_substr declared? I am guessing that doc3000 exceeds that
size.
>
> With Firebird 1.5, you can use the built in substring function which
> may work.
>
> select * from doc where substring(doc3000 from 1 for 3)='ERR'
>
> Adam
>