Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!columbia!rutgers!ames!ptsfa!ihnp4!packard!benw From: benw@packard.UUCP (B Weber) Newsgroups: comp.databases Subject: Informix/ESQL Question Message-ID: <584@packard.UUCP> Date: Mon, 3-Aug-87 12:51:23 EDT Article-I.D.: packard.584 Posted: Mon Aug 3 12:51:23 1987 Date-Received: Tue, 4-Aug-87 04:52:17 EDT Organization: AT&T Bell Laboratories, Liberty Corner Lines: 25 I'm a relative newcomer to Informix, so bear with me... I'm using ESQL to manage my database. My question is: Is there any way to do a select so that Informix just searches for a specified number of data items? For instance, suppose we have 100000 records in a table...maybe 8000 are of the kind we are interested in. However, the user wants a report that just lists 5 of them (any five). Right now we are using a cursor to do a select (of the 8000 records), and then doing 5 fetches to get five items for the report. Obviously, it is a tremendous waste of time to search the whole table, only to actually use a tiny number of the data items returned. So, is there any way to get something equivalent to "Select 5 items from ... where...."? Thanks, Ben Weber AT&T Technologies Liberty Corner, NJ ficit|packard!benw