Reputation: 5463
I have a field that could contain the following Value.
Hello. This value is from my MySQL table. ---End Message--- Timestamped 6:00pm
I want to grab everything before the ---End Message---
String. It will always be formatted that way. So basically I just want to grab Hello. This value is from my MySQL table.
Thank you!
Upvotes: 0
Views: 123
Reputation: 56357
select substring_index('Hello. This value is from my MySQL table. ---End Message','---End Message---',1)
Upvotes: 1