sampling
sampling
(OP)
Hi, Oracle has a function that allows one to sample a large table. can I do sampling in Informix? Thanks a lot!
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS Contact USThanks. We have received your request and will respond promptly. Come Join Us!Are you a
Computer / IT professional? Join Tek-Tips Forums!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines |
|
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
Register now while it's still free!
Already a member? Close this window and log in.
RE: sampling
Sorry, but you're going to have to explain what sampling is.
Regards,
Ed
Schaefer
RE: sampling
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
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's
SELECT 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 = 45678
If 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,
Ed
Schaefer
RE: sampling