Solved

Unordered Grouping in Query

Posted on 2000-03-09
3
205 Views
Last Modified: 2008-03-06
How can I make a grouping ordered without making a new PK? Should I use an index? if yes, how?
0
Comment
Question by:ndubow
3 Comments
 
LVL 4

Expert Comment

by:mitek
ID: 2600907
could you please explain what you're trying to do ?
0
 
LVL 4

Accepted Solution

by:
wqw earned 50 total points
ID: 2601023
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
 
LVL 1

Author Comment

by:ndubow
ID: 2601118
wqw,  BEAUTIFUL!!!!!! That's exactly what I wanted.

Thank you very much.

0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question