[SQL- Codewars]Suppress a space after a capital letter

Hi everyone,

I don’t know if I can ask this kind of help here but I will try it anyway. If I can’t or I am in the wrong section, please don’t hesitate to tell me.

So, as I need to improve my problem solving skill and enjoy very much coding in SQL, I am trying to resolve this Codewars kata .:blush:

After a lot of research and thinking, I think I am really close to solve it, but it seems I can’t find a solution to suppress the space after the first word capital letter.

Here is my code :

SELECT CONCAT_WS(' ', UPPER(LEFT(firstname, 1)), SUBSTRING(firstname, 2), lastname) AS shortlist
FROM Elves
WHERE firstname LIKE '%tegil%' or lastname LIKE '%astar%';

I would be very glad if someone could give me some kind of idea to finish my kata.:blush: Thanks in advance.