SyntaxFix
Write A Post
Hire A Developer
Questions
DECLARE @dd VARCHAR(200) = 'Net Operating Loss - 2007'; SELECT SUBSTRING(@dd, 1, CHARINDEX('-', @dd) -1) F1, SUBSTRING(@dd, CHARINDEX('-', @dd) +1, LEN(@dd)) F2