MySQL Forums
Forum List  »  Stored Procedures

Re: string concatenation in stored procedures
Posted by: Devart Team
Date: February 16, 2010 04:48AM

CONCAT('text', NULL) gives null.

If value is null, consider to use COALESCE function, for example -

...
SET ItemDesc = CONCAT(ItemDesc,'/', COALESCE(_pTitle, ''),' ',_Packing,_Qty); 
...

Devart Company,
MySQL management tools
http://www.devart.com/dbforge/mysql/



Edited 1 time(s). Last edit at 02/16/2010 06:02AM by Devart Team.

Options: ReplyQuote


Subject
Views
Written By
Posted
38617
February 16, 2010 03:06AM
Re: string concatenation in stored procedures
5316
February 16, 2010 04:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.