开发者

I need to select the value up to certain character

开发者 https://www.devze.com 2023-02-17 06:15 出处:网络
I have a field that could contain the following Value. Hello.This value is from my MySQL table.---End Message---Timestamped 6:00pm

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 ba开发者_如何学Pythonsically I just want to grab Hello. This value is from my MySQL table.

Thank you!


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

精彩评论

暂无评论...
验证码 换一张
取 消