I have test.csv,test1.csv,test2.csv...etc files. These files i am loading into custom table test through sql loader. in table test i have columns named seq_no,process_id apart from columns coimng from flat file mentioned above. i had created two sequence as mentioned below for the above mnetioned two columns.
CREATE SEQUENCE test
MINVALUE 1
INCREMENT BY 1
START WITH 1
NOCACHE
NOORDER
NOCYCLE ;
and
CREATE SEQUENCE test1
MINVALUE 1
INCREMENT BY 1
START WITH 1
NOCACHE
NOORDER
NOCYCLE ;
Now, seq_no will get populated depends on the no.of files getting loaded E.G: if v have 5 files then seq_no would be 1,2,3,4,5 And process_id would be inside file how many "FDETL" records are ther that many E.G if v have file 1, FDETL=2 then seq_no=1,process_id=1,2 if v have file 2,FDETL=3 then seq_no=2,process_id=1,2,3. It is some thing like process_id should repeat/file. Now i am using test1.nextval So how can i reset the sequence test1 so that for every file process_id will repeat from 1 to count(FDETL) records?