Reply to Re: sorting twice?!

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация