> Concat() returns Null if any field in the field list
> is Null.  How can I use it to return a String
> regardless, or is there another function to do it?

COALESCE(value,...)
Returns the first non-NULL value in the list.
mysql> SELECT COALESCE(NULL,1);
        -> 1
mysql> SELECT COALESCE(NULL,NULL,NULL);
        -> NULL
COALESCE() was added in MySQL 3.23.3.

So, if you use CONCAT(COALESCE(Myfield, ''), COALESCE(OtherField, '') )

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to