Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!math.lsa.umich.edu!caen!june.engin.umich.edu!lwk From: lwk@caen.engin.umich.edu (Woody Kellum) Newsgroups: comp.databases Subject: Sequencing in Oracle Message-ID: <1990Aug3.182017.27629@caen.engin.umich.edu> Date: 3 Aug 90 18:20:17 GMT References: <1990Aug2.151610.7273@ux1.cso.uiuc.edu> <2113@abcom.ATT.COM> Sender: news@caen.engin.umich.edu (CAEN Netnews) Distribution: usa Organization: University of Michigan Engineering, Ann Arbor Lines: 13 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 Internet: lwk@caen.engin.umich.edu