Subject Re: Insert Select Query
Author certfb
Usually when I see this error it is because the data you are trying to move has a record or records which contain more characters than the field you are trying to move them into, but as you say the character sizes are the same this is not the obvious problem.

It may be something to do with the database versions.

Try to move the data one field at a time to see if you can narrow down the problem.


--- In firebird-support@yahoogroups.com, Lars Mith <larsmith217@...> wrote:
>
> I'm in the process of using "FireBird Maestro" and the following query to
> move data from one massive table into much smaller individual tables.
>
> In this case, the SSN field in both tables is CHAR (9)
> The other two "source" fields are TIMESTAMP as are the DESTINATION fields.
>
> INSERT INTO VARIVAX (SSN,D1,D2)
> SELECT
> PUBLIC_TBL_EMP1.SSN,
> PUBLIC_TBL_EMP1.VARIVAX1_D,
> PUBLIC_TBL_EMP1.VARIVAX2_D
> FROM
> PUBLIC_TBL_EMP1
> WHERE
> PUBLIC_TBL_EMP1.SSN IS NOT NULL AND
> PUBLIC_TBL_EMP1.VARIVAX1_D IS NOT NULL
>
> After attempting to execute this query, I get the following error :
>
>
> Engine Error (code = 335544321):
> arithmetic exception, numeric overflow, or string truncation.
> unknown ISC error 335544914.
>
> SQL Error (code = -802):
> Arithmetic overflow or division by zero has occurred.
>
>
> Would you please help me understand what is causing this error so that if
> possible, I can correct it.
>
> Respectfully yours,
> Allan
>
>
> [Non-text portions of this message have been removed]
>