sql server - How to order by last name on a full name column? -
I have an SQL table with columns called an integer, in which for example, "John Smith".
How can order data from the last name visible in the Puranam column?
For a long name like "Lawrence John Fishburn", I want to order the data through the word "fishburn".
In this way, names are stored in the order
- First name
- middle name
- Last name < / Ul>
I am using Microsoft SQL Server 2005.
I will do something like this:
select from full name Table by reverse (substrate (reverse (fullnam), 0, fourteenx ('', reverse (fullname)))
Comments
Post a Comment