Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!ucsd!pacbell.com!pacbell!att!occrsh!occrsh.ATT.COM!srm From: srm@occrsh.ATT.COM Newsgroups: comp.databases Subject: Re: Sequencing in Oracle Message-ID: <143900004@occrsh.ATT.COM> Date: 4 Aug 90 22:05:00 GMT References: <5037285@caen.engin.umich.edu> Lines: 21 Nf-ID: #R:caen.engin.umich.edu:-503728596:occrsh.ATT.COM:143900004:000:1163 Nf-From: occrsh.ATT.COM!srm Aug 4 17:05:00 1990 /* ---------- "Sequencing in Oracle" ---------- */ >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: According to one of the Oracle personnel that I talked to about this very situation, he said that this feature of sequencing should not be used if the sequence number is required to be in any order. From what I gather, you are attempting to create an intelligent key. My suggestion to you is to either copy the data from ORDERD_TABLE to OLD_ORDERD_TABLE, delete/drop ORDERD_TABLE and insert from OLD_ORDERD_TABLE into ORDERD_TABLE -- or -- control your own sequencing by creating a table with a list of available sequence numbers. When one sequence number is dropped from the table, insert it back into the SEQUENCE_NUMBERS table (or have a 2-column table and NULL out the "used" flag). -- Steven R. McMaster UNIX(R) mail: ...!uunet!att!occrsh!srm AT&T Network Systems Oklahoma City Works Any opinions expressed in the message above are srm@occrsh.att.com mine, and not necessarily AT&T's.