To peform this task, I did the following
Created my table:
CREATE TABLE test (id INT, name VARCHAR(25));
Inserted test data:
INSERT INTO test VALUES (1, 'abcd ( dljdf');
INSERT INTO test VALUES (2, 'kjlkjkldjf ( ( ( ;dfld )');
Then, using the SUBSTRING function and the LOCATE function, I ran this query:
SELECT SUBSTRING(name, 1, (LOCATE(' ', name) - 1)) AS MyResult FROM test;
Result:
MyResult
---------
abcd
kjlkjkldjf
If you wish to include the blank between the end of the first alphabetical string and the left bracket, substitute (
for
(space) in the locate part of the above query. If this isn't suitable, please expand on your requirements.