I know about this limit statement but even if i write the following query, it *still does not work* because of the nested select statement:
"SELECT Max(id) FROM (select id from systemevents where infoId in ( 3 ) AND id > 100 order by id ASC LIMIT 50) AS t1 " ----- Original Message ----- From: "Catalin PLACINTA" <[EMAIL PROTECTED]> To: "Wajih-ur-Rehman" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, September 22, 2003 2:33 PM Subject: Re: plz help > Use the LIMIT clause in mysql instead of TOP clause for access and mssql. > Luck ! > > ----- Original Message ----- > From: "Wajih-ur-Rehman" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, September 22, 2003 12:22 PM > Subject: plz help > > > > I have this statement that works perfectly fine in Access and MSSQL: (In > > words, i first get the top 50 id values according to the where clause and > > then i get the maximum of those id values) > > > > "SELECT Max(id) FROM (select top 50 id from systemevents where infoId in > > ( 3 ) AND id > 100 order by id ASC) AS t1 " > > > > (Note that id > 100 changes in every iteration of the loop in my code) > > > > I want to run a similar query in MYSQL....Is there *any* way to accomplish > > it ? > > > > Thanx in advance > > > > Best Regards > > Wajih > > > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]