I need to strip and display strings of column in SQL Server. The strings are like this
Actual String I want to display in select statement
DCB1000-1 DCB1000
DCB-100-2 DCB-100
DCB-300-2 DCB-300
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this:
EDITED:
Well, try this:
The idea is to find last “-” char (so first one in reversed string) and get substring from the beginning to there…