开发者

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 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜