Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2005

    Unanswered: Delete with row counter

    I'm trying to write a sql sentence in Informix and Oracle.
    I want to erase the first 150000 rows from a table.
    The sentence in Oracle is "DELETE FROM [table] WHERE ROWNUM <= 150000", and it works perfectly.
    But I can't find a sentence with the same result in Informix.

    Anybody have any idea?


  2. #2
    Join Date
    Feb 2005
    I hate to do this, but try ROWID (rather than ROWNUM).

    The reason I hate to suggest it is because it is not an absolute indicator for the first 150000 records in the table. You make no mention of how much/often the data changes. You don't even mention the version of IDS that you are using. In fact, are you using IDS or Online or SE?

    In any case, the simplest answer is to try Rowid. Good luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts