I am trying to extract only the second word in a string. For example
Name[Column Name]
Patrick_Andrew_Marsh
Rajesh_Kumar_Sinha
I want to extract Andrew and Kumar from the column and similarly for all the other names. How do I do it?
I am trying to extract only the second word in a string. For example
Name[Column Name]
Patrick_Andrew_Marsh
Rajesh_Kumar_Sinha
I want to extract Andrew and Kumar from the column and similarly for all the other names. How do I do it?
You can use the split
function for this purpose
select split(name, '_')[1] from table