Quote:
Originally Posted by puzz
You can try something like this:
select substring(postcode,1,if(instr(postcode," ")=0,length(postcode),instr(postcode," "))) from my_table;
It will return part of your string from the first character to the first space...
|
what if they don't put a space in?