I'm trying to run a query in MySQL Query Browser that will concat 3 fields together to form a single date format. This part I don't have a problem with:
SELECT CONCAT(`Field12`, '/', `Field13`, '/', `Field11`) FROM `mini`;
However, not all rows have these fields filled, and I end up with / / in the result. I would like to do something such as
SELECT IF(`Field12` IS NOT NULL THEN CONCAT(`Field12`, '/', `Field13`, '/', `Field11`) ELSE ' ') FROM 'mini';
Any way to get this working properly?