i have a problem with sorting this thing... i want to sort a column without changing the data in the other column. i have an attached document. a picture of my query and database.. tnx :)

Edited by rhone0809: n/a

5 Years
Discussion Span
Last Post by rhone0809

it is not possible ,if you use order by desc then it will sort all records descending order . but you want just to show single column like this , this will will effect all the related records


I don't understand either what you are asking, or why you are asking what I think you are.
It is not possible to retrieve records from a table with 2 separate sorts. Then you are not retrieving records, but 2 separate lists - which have nothing to do with each other.
If the later is your case then use 2 different queries.
If it's not, then can you please explain what you expect to get by "breaking" the association between employeeID and LastName ? It will make the results useless (LastName ABADIANO won't have employeeID 000000706, but some random one and this is against the logic of a db).


i import it to the excel file. i copied the EmployeeID to another excel file then sort it to ascending then copied it to original excel file then export to sql database :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.