Subject Re: [firebird-support] date conversion (firebird bug?)
Author Helen Borrie
At 11:06 AM 5/10/2005 +0200, you wrote:
>because of some circumstances, I have stored my data as unix timestamp
>(so, in
>integer field). Now I'm trying to convert it to Firebird DATE/DATETIME
>I'm now operating over developer (so empty) database. I have successfully
>created new domain (DATE NOT NULL) and changed all time fields to this new
>domain. All procedures and view have been successfully recompiled.
>However, when I'm trying to insert data in existing (but empty) table (insert
>into some_tbl(date_field) values('2005-05-05')), I get this error:
>Overflow occurred during data type conversion.
>conversion error from string "2005-05-05".
>When I create new table, this insert is done OK.
>It seem that some metadata has not been updated (or perhaps, some triggers
>been created or whatever): is there any way how to make it work without
>recreating table? This would be a lot of pain as database have over 100
>tables and stored procedures with huge dependency tree (of course, this table
>is on the bottom).
>Or am I doing something completely wrong?

Well, if you try to send a date literal to an integer column you will get
this error.

The description here is pretty confused. What did you do to the existing
data to convert it from integer to DATE (or TIMESTAMP)? When you do a SHOW
TABLE (in isql) what do you see for the definition of this column?

>Or this seem to be a Firebird bug and I have to report it?

We don't even know what the actual problem is yet....