Depending on which database you're using, you can do it with the query:
In MySQL, you can do something like:
SELECT SUBSTRING_INDEX(theColumn," ",10) FROM tablename
Basically this will return a string up until the 10th space character in theColumn
Scroll down to about half way down this following page for more information
http://www.mysql.org/doc/S/t/String_functions.html
I've always believed you should as much possible work with the database query.