Hi Gert, > The OOo base manual somewhere says that the format of the SQL statement is > dependent on the format of the underlying database.
Which is true, since every database extends the SQL standard with its own functionality, and OOo cannot know all of them. To a certain extent, the UI tries to hide this from you, but when it comes to directly editing an SQL query, you need to know what the underlying database does expect. > To get the maximum value for a column, MySQL allows a select statement like: > > SELECT `Date` FROM `tablename` > WHERE `Date` = (SELECT MAX(date) FROM `tablename`); > > However, when I cut and paste this into a Base SQL stmt I get a parse error > " Expecting 'Between' or 'In' or 'SQL_Token_Like' " Try quoting the date column name in MAX(date), i.e. MAX(`Date`). Then it works for me. Ciao Frank -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Database http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
