select SUBSTRING(M.SoldierName, len(M.SoldierName) - charindex(' ', REVERSE(M.SoldierName))+2, len(M.SoldierName)) as LastName, M.YearOfAction, M.MilRank from dbo.MedalOfHonor M order by LastName The order by clause liberally accepts SQL expressions.
↧