home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!emory!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!anaconda.cis.ohio-state.edu!schueman
- From: schueman@anaconda.cis.ohio-state.edu (gregory schueman)
- Newsgroups: comp.databases.oracle
- Subject: Re: SQL*Loader REALLY unique sequences
- Message-ID: <1992Dec11.185755.15143@cis.ohio-state.edu>
- Date: 11 Dec 92 18:57:55 GMT
- Article-I.D.: cis.1992Dec11.185755.15143
- References: <1gacpnINNbjl@fmsrl5.srl.ford.com>
- Sender: news@cis.ohio-state.edu (NETnews )
- Organization: The Ohio State University Dept. of Computer and Info. Science
- Lines: 22
-
-
-
- >> I am developing a system which needs to append ASCII data into a table
- >> and generate a unique identifier for each new row. SQL*Loader has a
- >> SEQUENCE function which will generate unique sequence number, but the
- >> numbers will only be unique for a given SQL*Loader session, not for
- >> the destination table.
- >>
- >> Can anybody offer a way to get SQL*Loader to give me a sequence number
- >> which is unique for the entire table?
-
- What you want to do is use a SEQUENCE NUMBER generator. Such a beast
- is not session specific.
- syntax:
- create sequence number my_table_seq_num
- start at 1 , increment by 1;
- Then on the insert specification for SQL*LOADER you can
- specify the appropriate info. Something like
-
- my_table_seq_num.nextval <---- for the field value that you need.
-
- -Greg
-