Re: Unique sequence number per datafile using SQL Loader

From: <radhika.penagonda_at_gmail.com>
Date: 25 Oct 2006 11:14:21 -0700
Message-ID: <1161800061.546024.219910_at_m7g2000cwm.googlegroups.com>


[Quoted] [Quoted] That will create a new sequence number for each record. What I need is just one sequence number for each file. (All records in that file will have the same number)
The next file will have another number...so on and so forth.

gazzag wrote:
> radhika.penagonda_at_gmail.com wrote:
> > Here's the requirement:
> >
> > I have a datafile with say 500 records to be loaded. Each time I load
> > the file, I need to generate a sequence number unique to the file,
> > which means all the 500 records loaded from that file should have the
> > same sequence number.
> > The next file to be laoded will have another unique number.
> > I thought of using to_number(to_char(sysdate, 'YYYYMMDDHHMMSS') for a
> > unique sequence. however, this does not generate one unique number for
> > a file.
> >
> > Is there any other way to handle this requirement in the control file
> > itself.
>
> Look into using Oracle sequences.
>
> http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6015.htm#i2067093
>
> HTH
>
> -g
Received on Wed Oct 25 2006 - 20:14:21 CEST

Original text of this message