Subject | Re: arithmetic exception, numeric overflow, or string truncation |
---|---|
Author | Adam |
Post date | 2006-11-09T00:24:07Z |
--- In firebird-support@yahoogroups.com, "Roberto Freitas"
<solanofreitas@...> wrote:
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
<solanofreitas@...> wrote:
>How is f_substr declared? I am guessing that doc3000 exceeds that size.
> 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?
>
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