[thelist] SQl: Top xx

Chris Evans chris at fuseware.com
Wed Apr 11 16:05:00 CDT 2001


I'm looking for a generic SQL way to get the latest x number of records
based on date.  I know on MS SQL Server I can use TOP, but I don't think
that is "cross-database" compatible.  Right now, I am using the MaxRows
attribute of CFQUERY to limit the number, but I'd rather do it in the query.
This is for an application that could be run on most popular databases, so I
would llike to make it as DB agnostic as possible.


Chris Evans
chris at fuseware.com
http://www.fuseware.com








More information about the thelist mailing list