ItsPronounced
ItsPronounced

Reputation: 5463

I need to select the value up to certain character

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

Answers (1)

Nicola Cossu
Nicola Cossu

Reputation: 56357

select substring_index('Hello.  This value is from my MySQL table.  ---End Message','---End Message---',1)

Upvotes: 1

Related Questions