spatne lcase(concat(..)) v mysql5 - bug?

Michal Molhanec molhanec na seznam.cz
Úterý Únor 14 10:40:21 CET 2006


Ondrej Koala Vacha napsal(a):
> CONCAT(str1,str2,...)
> Returns the string that results from concatenating the arguments. Returns
> NULL if any argument is NULL. May have more than 2 arguments. 
> A numeric argument is converted to the equivalent string form:    <-------------------
> mysql> SELECT CONCAT(My, S, QL);
> -> MySQL
> mysql> SELECT CONCAT(My, NULL, QL);
> -> NULL
> mysql> SELECT CONCAT(14.3);
> -> 14.3

upgraduj manual, ten aktualni pise:

==================================cut
CONCAT(str1,str2,...)

Returns the string that results from concatenating the arguments. May
have one or more arguments. If all arguments are non-binary strings, the
result is a non-binary string. If the arguments include any binary
strings, the result is a binary string. A numeric argument is converted
to its equivalent binary string form; if you want to avoid that, you can
use an explicit type cast, as in this example:

SELECT CONCAT(CAST(int_col AS CHAR), char_col);

CONCAT() returns NULL if any argument is NULL.

mysql> SELECT CONCAT('My', 'S', 'QL');
         -> 'MySQL'
mysql> SELECT CONCAT('My', NULL, 'QL');
         -> NULL
mysql> SELECT CONCAT(14.3);
         -> '14.3'
==================================cut

tzn. pouzij select lcase(concat(cast(id as char),' ',tt)) from a;



Další informace o konferenci Databases