CONCAT(field1, " - ", field2) as field1
there are several ways to deal with NULLs here
check each field individually --
CONCAT( COALESCE(field1,'') , ' - ' , COALESCE(field2,'') )
however, if field1 is NULL, then the result starts with the dash, so...
CONCAT(
COALESCE(CONCAT(field1,' - '),'')
, COALESCE(field2,'') )
which is esthetically better but rather clumsy
my favourite approach --
CONCATE_WS( ' - ' , field1, field2 )
check out CONCAT_WS in the manual for how it works with NULLs
;o)
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.