Quantcast
Channel: Substring In Sql | Automatic Website Traffic RSS
Viewing all articles
Browse latest Browse all 989

Different Methods to Sort SQL Server Result Sets

$
0
0
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.

Viewing all articles
Browse latest Browse all 989

Trending Articles