tags:

views:

19

answers:

1

I have used Select Subst(field_name, 1, Locate('',field_name)) as first_word from table_name

and it works for the first word so I tried using last_word but still get the first word so I guess there must be a differet way??

+1  A: 

Well, you probably could do:

SELECT REVERSE( SUBST( REVERSE( field_name ), 1, LOCATE( ' ', REVERSE( field_name )))

This likely won't work if your field has trailing spaces or is a single word.

eaolson