i have this= 'student 1-99-98 - 281 - 1567519464' an this length is dynamic i want Phrase of after last '-' i want to extract this='1567519464' please help me in Microsoft SQL query
SELECT Ltrim(rtrim(RIGHT('student 1-99-98 - 281 - 1567519464', (CHARINDEX('-',REVERSE('student 1-99-98 - 281 - 1567519464'),0)-1))))