Posted by Jack Vamvas on 10/02/97 11:51
Yes. Something like : SELECT myColID FROM myTable
WHERE myColID IN (SELECT TOP 20 FROM myTable ORDER BY dateDESC)
ORDER BY companyName ASC
--
----
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"Tim" <Citizen10Bears@gmail.com> wrote in message
news:1151401355.662526.118990@75g2000cwc.googlegroups.com...
> here's a good one for you...
>
> I want to return the last 20 records I have modified. I have a
> datemodified field - excellent.
> So I run a query to select the top 20 when ordered by datemodified
> desc.
> But now I have these results I want them sorted by companyname.
>
> Is this possible?
>
> Yes I could use my GUI to do the second sort, but can it be done just
> in a query?
>
> Thanks
>
> Tim
>
[Back to original message]
|