home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / database / oracle / 2485 < prev    next >
Encoding:
Internet Message Format  |  1992-12-11  |  1.3 KB

  1. Path: sparky!uunet!ogicse!emory!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!anaconda.cis.ohio-state.edu!schueman
  2. From: schueman@anaconda.cis.ohio-state.edu (gregory schueman)
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: SQL*Loader REALLY unique sequences
  5. Message-ID: <1992Dec11.185755.15143@cis.ohio-state.edu>
  6. Date: 11 Dec 92 18:57:55 GMT
  7. Article-I.D.: cis.1992Dec11.185755.15143
  8. References: <1gacpnINNbjl@fmsrl5.srl.ford.com>
  9. Sender: news@cis.ohio-state.edu (NETnews        )
  10. Organization: The Ohio State University Dept. of Computer and Info. Science
  11. Lines: 22
  12.  
  13.  
  14.  
  15. >> I am developing a system which needs to append ASCII data into a table
  16. >> and generate a unique identifier for each new row. SQL*Loader has a
  17. >> SEQUENCE function which will generate unique sequence number, but the
  18. >> numbers will only be unique for a given SQL*Loader session, not for
  19. >> the destination table.
  20. >> 
  21. >> Can anybody offer a way to get SQL*Loader to give me a sequence number
  22. >> which is unique for the entire table?
  23.  
  24. What you want to do is use a SEQUENCE NUMBER generator.  Such a beast
  25. is not session specific.
  26. syntax:
  27.    create sequence number my_table_seq_num
  28.       start at 1 , increment by 1;
  29. Then on the insert specification for SQL*LOADER you can
  30. specify the appropriate info.  Something like
  31.  
  32. my_table_seq_num.nextval  <---- for the field value that you need.
  33.  
  34. -Greg
  35.