Subject Re: Inserting into Table needing truncate for varchar
Author Adam
--- In firebird-support@yahoogroups.com, "fabianchocron"
<fabianchocron@...> wrote:
>
> Hi All,
>
> My name is Fabian, and I have being using Firebird for about 2
years
> with greate results.
>
> I have an App that uses "Insert into Table Select Varchar ....
>
> The problem is that sometimes the Varchar is "bigger" than the
defined
> receiving field. Is there any way to "truncate on the fly"... so
the
> app can insert regardless of the size of the "selected" field?
>

You can use the substr call in the UDF ib_udf.dll to make sure it
fits. This UDF is installed by the Firebird installer, so it is
available to use.

Adam