Check out the "set rowcount" command in the SQL documentation for the database you are using. For example:
set rowcount 1 select columnName from tableName... (optional where clause as appropriate) set rowcount 0 This should cause the database engine to return only one row when the query is executed, then turn off the row restriction afterwards (else all subsequent queries will return only one row.) For MS SQL, you might also be able to use "select TOP ...." Or, in worst case, you could resort to using a cursor. -----Original Message----- From: Gregory Price [mailto:[EMAIL PROTECTED]] Sent: Monday, October 15, 2001 10:29 AM To: JRun-Talk Subject: OT: SQL does anyone know how to get a single row in a select statement in sql say I want to grab the 5th row in some table regardless of its contense, i just want the 5th record any help is appreciated! Thanks Greg Price ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
