So basically I need to get a part of the postcode string, all before an empty space
my current query is
select postcode, left(postcode, length(postcode) - strpos(' ', postcode))
from postcodetable
But it just doesn't return the post code correctly, example:
1st column is NW1 1AA, 2nd column should just be NW1 but instead it just repeats the first column