• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

Unordered Grouping in Query

How can I make a grouping ordered without making a new PK? Should I use an index? if yes, how?
0
ndubow
Asked:
ndubow
1 Solution
 
mitekCommented:
could you please explain what you're trying to do ?
0
 
wqwCommented:
is this what you are looking for?

select * from (select groupid, max(whatever) as whatever
        from yourtable
        group by groupid) as s
order by s.whatever

orders a grouped resultset

HTH,

</wqw>
0
 
ndubowAuthor Commented:
wqw,  BEAUTIFUL!!!!!! That's exactly what I wanted.

Thank you very much.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now