Subject | Re: [firebird-support] COALESCE |
---|---|
Author | Arno Brinkman |
Post date | 2004-06-16T17:10:05Z |
Hi,
-If all datatypes are the same then that datatype is used.
-If there is any char datatype mixed with any other datatype then output
will be varchar.
-If there is any varchar datatype output will always be varchar datatype.
- ....
Firebird behaves as much as possible according the SQL standard here. See
"9.3 Data types of results of aggregations"
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81
> > Does anybody know what's going on?It's not determined by first item.
> > Of course, I would be glad about a small workaround ;-)
>
> Each column of result set must have determined its datatype,
> i.e. datatype can't change dynamically for each fetched row.
> Result type of COALESCE expression is determined by its first item,
> i.e. DATE. String 'not defined' can't be converted to DATE, of course.
-If all datatypes are the same then that datatype is used.
-If there is any char datatype mixed with any other datatype then output
will be varchar.
-If there is any varchar datatype output will always be varchar datatype.
- ....
Firebird behaves as much as possible according the SQL standard here. See
"9.3 Data types of results of aggregations"
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81