Subject Re: [firebird-support] Timestamp overflow error
Author Dmitry Yemanov
dinol.softedge wrote:
>
> I am trying to run an insert statement but the timestamp field is
> giving me an error
>
> INSERT INTO
> TBL_INV_TRANS(
> INVENTORY_ID,
> IN_OUT,
> DESCRIPTION,
> QUANTITY,
> LOCATION_ID,
> COST_PRICE,
> JOB_CARD_ID,
> DATE_TIME,

DATE_TIME is the 8th field.

> SELECT TBL_JOB_CARD_INVENTORY.INVENTORY_ID,
> 'Out',
> 'Sale',
> TBL_JOB_CARD_INVENTORY.QUANTITY,
> 1,
> TBL_JOB_CARD_INVENTORY.JOB_CARD_ID,
> CAST(TBL_JOB_CARD.DATE_TIME AS TIMESTAMP),

DATE_TIME is the 7th field.

Obviously, you forgot to insert either the LOCATION_ID or the COST_PRICE
and the value list becomes shifted, thus trying to assign a timestamp to
a numeric.


Dmitry