-- Collection of code snippets by Arne Vajhøj 
-- posted to eksperten.dk, usenet and other places (2002-now) 
SELECT CONCAT(SUBSTRING('Klaus Anders Klausen',1,1),SUBSTRING('Klaus Anders Klausen',LOCATE(' ','Klaus Anders Klausen')+1,1)) AS initial;

SELECT CONCAT(SUBSTRING('Klaus Anders Klausen',1,1),SUBSTRING(SUBSTRING_INDEX('Klaus Anders Klausen',' ',-1),1,1)) AS initial;

SELECT CONCAT(SUBSTRING(navn,1,1),SUBSTRING(navn,LOCATE(' ',navn)+1,1)) AS initial FROM tabel;

SELECT CONCAT(SUBSTRING(navn,1,1),SUBSTRING(SUBSTRING_INDEX(navn,' ',-1),1,1)) AS initial FROM tabel;
