Steve, Doug & Gordan, Thanks for taking the time to help me.
Billy ----- Original Message ----- From: "Steve Rapaport" <[EMAIL PROTECTED]> To: "Billy Reed" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, December 28, 2001 2:17 AM Subject: Re: MS Access to MySQL convert > Instead of TOP 5 DistKm FROM SCLeague > you can probably use > > > DistKm SORTED BY DistKm DESCENDING LIMIT 5 > > The rest about temp files is probably best to read > Goran Bobic's mail. > > > Billy Reed wrote: > > > I am new to MySQL and am trying to convert : > > > > SELECT SUM(DistKm) AS Distance FROM (SELECT TOP 5 DistKm FROM XCLeague WHERE > > LoginID='billyreed' AND HGPG='PG' ORDER BY DistKm DESC) > > > > This is a subselect which selects the top 5 cross country flight distances > > of hang glider pilots (for a specific pilot) and then sums the result for > > each pilot. Subsequent code writes this to a new table showing who is in the > > lead !! > > > > Can anyone suggest how this is done in MySQL. It doesnt seem to like the TOP > > 5 syntax. > > > > I have been able to convert the rest of my site from MS Access to MySQL but > > am struggling with this. > > > > many thanks in anticipation. > > > > Billy Reed > > > > > > --------------------------------------------------------------------- > > Before posting, please check: > > http://www.mysql.com/manual.php (the manual) > > http://lists.mysql.com/ (the list archive) > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > To unsubscribe, e-mail <[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > > > > > > -- > Steve Rapaport > World Citizen > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php