Skip to content
Advertisement

Seperate first and last names from single column

I have a person table where the name column contains names, some in the format “first last” and some in the format “first”. My query SELECT name, SUBSTRING(name FROM 1 FOR POSITION(‘ ‘ IN name) ) AS …