First and Last word in string
Hi,
I do not know MySQL very well, I know a little more about SQLServer and I'm having a hard time resolving an issue.
I have a table with a column of names where I need the query to return only the first and last name.
For example: José Joaquim da Silva Xavier
Output: José Xavier
In SQLServer I would do so:
_________________________
select
substring(FullName,1,CHARINDEX(' ',FullName)) + Reverse(substring(REVERSE(FullName),1,CHARINDEX(' ',REVERSE(FullName))))
from People
_________________________
How I make this in MySQL?
PS: I'm Brazilian and I do not speak English, I hope you understood.
Subject
Written By
Posted
First and Last word in string
September 25, 2017 09:26AM
September 25, 2017 09:38AM
September 25, 2017 11:02AM
September 25, 2017 11:10AM
September 25, 2017 11:39AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.