I am attempting to do the following:
SELECT forename,
forename2,
surname,
(SELECT (COALESCE(LEFT(forename, 2)),"") +
(COALESCE(LEFT(forename2, 1)),"") +
(COALESCE(LEFT(surname, 1)), "") as Mnemonic)
from Persons
trying to get, first 2 letters of forename, first letter of forename2(if NOT null), and first letter of surname if not null, with "" empty strings where a null is present.
any help would be much appreciated, Regards, Bserk