CREATE TABLE #Table1
([COLN] varchar(24))
;
INSERT INTO #Table1
([COLN])
VALUES
('SQL-Tutorial'),
('Oracle-Tutorial'),
('IBM DB2-Tutorial'),
('Sybase ASE-Tutorial'),
('PostgreSQL-Tutorial'),
('MariaDB-Tutorial'),
('MySQL-Tutorial'),
('Teradata-Tutorial'),
('IBM Informix-Tutorial'),
('Amazon SimpleDB-Tutorial')
;
SELECT PARSENAME(REPLACE(coln,'-','.'),2) [before],
PARSENAME(REPLACE(coln,'-','.'),1) [after] from #Table1
выход
before after
SQL Tutorial
Oracle Tutorial
IBM DB2 Tutorial
Sybase ASE Tutorial
PostgreSQL Tutorial
MariaDB Tutorial
MySQL Tutorial
Teradata Tutorial
IBM Informix Tutorial
Amazon SimpleDB Tutorial