SQL switch firstname and lastname | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

SQL switch firstname and lastname

Hello. I am Sorry for question but I am stuck. How can I switch row where is lastname and first name = 'Ware, John' to get fullname without comma 'John Ware' ? Thank you very much

18th Jan 2022, 10:53 AM
Adam Filip
2 ответов
+ 2
Break this into smaller problems. First problem is you need a way to identify where the comma is. If you can get the index of that you can break up the string with substring and concat the pieces together. Remember that the comma will not always have the same index in the string. Hope this helps!
18th Jan 2022, 11:04 AM
Arthur Tripp
Arthur Tripp - avatar
0
Thank you for hint. Can I use STRING. SPLIT() for this?
18th Jan 2022, 12:39 PM
Adam Filip