In my experience, any record containing a NULL value in the function field will cause the function to "fail". Ensure none of the records have a NULL value in zinr for the recordset returned. I think you can do so by adding
AND zinr is NOT NULL although I don't necessarily recall if this helped me or not. HTH Aaron ----- Original Message ----- From: "Ian Van Kretschmar" <[EMAIL PROTECTED]> Newsgroups: cfaussie To: "CFAussie Mailing List" <[EMAIL PROTECTED]> Sent: Friday, October 22, 2004 10:35 AM Subject: [cfaussie] SQL MAX() Function > I cannot see to get the SQL function MAX() to work (not to be confused with > the CMFL function of the same name). I would assume that when designing an > SQL query using the SELECT statment I would be able to use all of the > standard SQL commands and/or functions. > > When I try to create a new Recordset (Query) in Dreamweaver MX and "test" > the following statement I get "No Recordset was Returned." > > SELECT max(zinr) > FROM zimmer > WHERE mpehotel=1 > > Obviously this query is designed to return the highest value in the column > "zinr" where the value for mpehotel is equal to 1. > > If I remove the max() function I get results when I click on the "test" > button (all values in the zinr column. I know the syntax of my statement is > correct because it works in any other SQL clients and query analysers. I am > working with a MS SQL database. > > Alternatively, how can I have returned the highest number in a column? > > Kind Regards, > > IHVK > > > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > Aussie Macromedia Developers: http://lists.daemon.com.au/ --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
