Andy - I was not sure of the requirements myself. By "extract" do we mean "retrieve" or "remove". The previous query would cover the "retrieve" portion. The following should cover "remove":
Code:
SELECT SUBSTR(myfield,INSTR(myfield,'-')+1,50) AS post_hyphen FROM my_table;
This assumes myfield will not be more than 50 characters long.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.