Link to home
Start Free TrialLog in
Avatar of Valleriani
VallerianiFlag for Sweden

asked on

MYSQL Query to remove anything after a second '-' including the '-'

Hello,

Most of my data in a row called 'mtaName' is labelled like this:

"test.com - G1 - 10-11-2011"
"test2.com - G2 - 09-11-2011"

etc..

What I want, is a method to remove anything past the second '-' So taking the example above:

"test.com - G1"
"test2.com - G2"

Without the date pretty much and the extra '-'. Is this possible at all? I know of regexp but not how to use it in this context.

Thank you!
ASKER CERTIFIED SOLUTION
Avatar of ralmada
ralmada
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Valleriani

ASKER

Thank you !