Mark's Tech Stuff
Programming solutions, source code, solutions to tech problems and other tech related stuff.
Wednesday, July 18, 2012
MySQL Locate Last Occurrence of Space in Field
You'd think the mighty MySQL would come with its own function to do this but it doesn't. So I do it like this:
length(`
my_field
`)-locate(' ',reverse(`my_field`))+1
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment