Hello All,
I'm using SQL 2005. I have a text column with the following data:
CourseName
Physic
Physic One - SS retake - Oct
Physic One - SS retake - Nov
Physic One - SS retake - Dec
Chemistry Beg
Chemistry Beg - SS retake - Oct
Chemistry Beg - SS retake - Nov
etc...
How do I truncate all the characters after the first - occurence. so the goal is to get the course name as follow:
CourseName
Physic One
Chemistry Beg
Your help/suggestion is greatly appreciated.
Thanks
I'm using SQL 2005. I have a text column with the following data:
CourseName
Physic
Physic One - SS retake - Oct
Physic One - SS retake - Nov
Physic One - SS retake - Dec
Chemistry Beg
Chemistry Beg - SS retake - Oct
Chemistry Beg - SS retake - Nov
etc...
How do I truncate all the characters after the first - occurence. so the goal is to get the course name as follow:
CourseName
Physic One
Chemistry Beg
Your help/suggestion is greatly appreciated.
Thanks