Error on extract year from date
-------------------------------

                 Key: CORE-5439
                 URL: http://tracker.firebirdsql.org/browse/CORE-5439
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 4.0 Initial
         Environment: FB 4.0.0.487, Dialect 1
            Reporter: Arkadiusz Wolanski


The statement: 

select '01-01-'||(extract(year from Cast('today' as date)) - 1)
from rdb$database

cause the following Error:

arithmetic exception, numeric overflow, or string truncation.
string right truncation.
expected length 17, actual 23.

With explicit cast it works:

select (extract(year from Cast('today' as date)) - 1), '01-01-'||(extract(year 
from Cast('today' as date)) - cast(1 as smallint))
from rdb$database




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to