Reply to Re: slightly OT, sql question

Your name:

Reply:


Posted by Hilarion on 10/26/70 11:24

> > SELECT MIN( id ) AS res_id
> > FROM some_table
> > GROUP BY prod_nr
> > ORDER BY 1

> Thank you very much!

No problem.


> Without the ordering works great.

Should also work with ordering (if you need it), but
depending on SQL engine you are using you may have to
change "ORDER BY 1" to "ORDER BY res_id" or
"ORDER BY MIN( id )".


Hilarion

[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

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