954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

can anyone help me with this please! i have problem regarding SQL queries

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 :)

Attachments Doc1.doc (150.5KB)
rhone0809
Newbie Poster
15 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

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

waqasaslammmeo
Posting Pro in Training
472 posts since Aug 2011
Reputation Points: 38
Solved Threads: 82
 

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).

adam_k
Practically a Posting Shark
803 posts since Jun 2011
Reputation Points: 256
Solved Threads: 149
 

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 :)

rhone0809
Newbie Poster
15 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You