sampling sampling cruel (Programmer) (OP) 18 Mar 02 14:39 Hi, Oracle has a function that allows one to sample a large table. can I do sampling in Informix? Thanks a lot! RE: sampling olded (Programmer) 19 Mar 02 11:21 Hi:Sorry, but you're going to have to explain what sampling is.Regards,EdSchaefer RE: sampling cruel (Programmer) (OP) 19 Mar 02 12:47 Some tables are huge. Instead of pulling out the whole table, you randomly select 2% of the total rows? One way you can do it in Oracle is using 'sample (2)' after from statement.While we are at it, is there also a feature in Informix that is similar to 'where rownum<n' in Oracle?I have checked online documents and personal referrence, it was not there. Thanks RE: sampling olded (Programmer) 19 Mar 02 16:08 cruel:I don't know much about Oracle. Thanks for the update. The closest thing I can think of using FIRST. Beginning with Online 7, Informix provides a FIRST keyword. So if you wanted to the first 10 rows, it'sSELECT FIRST 10 col1, col2 FROM table_name WHERE ....For the Informix 4GL programmers, in order to use FIRST, declare the select as a cursor.Informix also has a rowid. It's a guaranteed unique integer value and does not change for the life of the row. So you can do:SELECT * FROM table_name WHERE rowid = 45678If you're using fragmented tables, rowid works a little different. I've really not had fragment tables, but I think you have to delcare the rowid column.Regards,EdSchaefer RE: sampling cruel (Programmer) (OP) 19 Mar 02 18:24 Thanks, Ed. That is helpful!