Is this a bug? I am writing a report where I don't want a record to span more than 1 line.
This only happens if the person's name is too long so I thought something like this might work, but it doesn't. Am I doing something wrong or is this a bug?
IF(CHAR_LENGTH(CONCAT (e.Salutation,' ',e.Forename,' ',e.Surname)<20),
CONCAT(e.Salutation,' ',e.Forename,' ',e.Surname),
CONCAT(e.Salutation,' ',SUBSTRING (e.Forename,1,1),' ',e.Surname)) AS 'Name',
FROM Employees AS e
ORDER By EmployeeNo
No matter how long the person's name is it always plumps for the: Mr. S. Biglongsurname as opposed to Mr Someone Biglongsurname.