How to remove specific characters from strings in sql
SELECT (
        REPLACE
                (CASE 
                    WHEN RIGHT (COL, 1) = '-' 
                        THEN LEFT(COL, LENGTH(COL) - 1) 
                    ELSE COL
                END, '6|', ''
                )
        )   
FROM Table