SQL substring matching a character
I have the following string:
"My dog spot (page 1)". I want just "My dog spot". How do I do this in SQL Server? Thanks. By the way, I don't know how long the string in the parentheses is going to be. |
By the way, the string "My dog spot" may have parentheses too.
|
Code:
select left(COL, locate('\n', COL) - 1) from tbl; |
All times are GMT -5. The time now is 08:07 AM. |