how to take till particular char in sql code example Example: reutrn string after character sql select right(col, charindex('-', reverse(col)) - 1)