Subject | Re: [firebird-support] Inserting into Table needing truncate for varchar |
---|---|
Author | Helen Borrie |
Post date | 2006-04-18T05:19:45Z |
At 02:13 PM 18/04/2006, you wrote:
target column.
An alternative is to use the internal function SUBSTRING() to limit
the size of the string, viz. SUBSTRING(aVarchar from 1 for n) where,
again, n is the size of the target column.
./heLen
>Hi All,Yes. Use CAST( aVarchar as Varchar(n)), where n is the size of the
>
>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?
target column.
An alternative is to use the internal function SUBSTRING() to limit
the size of the string, viz. SUBSTRING(aVarchar from 1 for n) where,
again, n is the size of the target column.
./heLen
>Many thanks!
>Fabian
>
>
>
>
>
>
>
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://firebird.sourceforge.net and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Yahoo! Groups Links
>
>
>
>