Try the following:
Select SUBSTRING(Account,0,CHARINDEX('-',Account)+3) as UpdatedAccount, Account FROM Documents WHERE SubmissionID=45925 and LEN(SUBSTRING(Account, CHARINDEX('-',Account)+1,LEN(Account)) ) > 2 AND CHARINDEX('-',Account) > 0
It is ugly, but it seems to do what you want
Your update will look like this:
UPDATE Documents SET Account = SUBSTRING(Account,0,CHARINDEX('-',Account)+3) WHERE SubmissionID=45925 and LEN(SUBSTRING(Account, CHARINDEX('-',Account)+1,LEN(Account)) ) > 2 AND CHARINDEX('-',Account) > 0
UPDATE:
Added to the check without hyphenated scripts, so you will not give any explanation. However, I would recommend going with @Richards solution. It is much more beautiful.
source share