Re: SQL: How to select first N rows?
Posted in 1997
Rajesh Ravindran wrote: > hi, > > 1. create a temp table. > 2. do an insert select from that source table into this temp table. > 3. Whenever u create a temp table & do an insert select the rows inserted > would have rowid from 1 onwards serially. Not true. It may work for SE. But with Online the rowid's may be arbitrary and surely do not start with 1. > So just do a select from this temp tabel where rowid < N . > > Not an effiecient way. But this worked for me. > > Rajesh > > }Cosmo asks: > }>Is there a way to select the first N rows from a table? > } > }Issue the command to Informix Dynamic Server 7.3, due out in the > }Spring. > }___________________________________________________________ > }Clem Akins (aka clem@informix.com) > }Informix Software, Inc (Standard disclaimers apply) > }International Technical Support > }Last seen: THE Natural History Museum, London--all day! > } > } Helmut Leininger Bull AG Unix Support