Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!math.lsa.umich.edu!caen!news From: lwk@caen.engin.umich.edu (Woody Kellum) Newsgroups: comp.databases Subject: Sequencing records in Oracle Message-ID: <1990Aug3.182647.27959@caen.engin.umich.edu> Date: 3 Aug 90 18:26:47 GMT Sender: news@caen.engin.umich.edu (CAEN Netnews) Organization: caen Lines: 17 I have an application in Oracle that requires records to have a sequence number associated them. I want to be able to insert new records and move old records around within the sequence, and then re-number the records periodically, keeping the same order, so that the sequence numbers don't get to hairy. I want something like: UPDATE ORDERD_TABLE SET ORDERNO = MY_$SEQ.NEXTVAL ORDER BY ORDERNO; The above is not a valid Oracle sql statement. There must be a way to do this, but I haven't thought of it yet. Any ideas? Woody Kellum (lwk@caen.engin.umich.edu) -- Woody Kellum Internet: lwk@caen.engin.umich.edu