Valleriani
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!
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER