I would like to extract only the first word to the first space.
I used the following query:
select upper(substring(substring(descripcion,28),0,length(substring(descripcion,28))-position(' ' in reverse(substring(descripcion,28)))+1)) from evento where descripcion ~ 'Act. datos:Actualización';
But it gives me back everything, not just the first word before the first space.
How can I get the following result
- John
- Elena
- Maria
- Marcus
- Mario
- Ana
- Pedro
etc.