> -----Original Message----- > From: Steve Few [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 24, 2002 10:37 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: DBI, KEYS, DBD::Oracle, KEY Sequence # > > > What is best way to assign a KEY index number to my header/data lines > INSIDE a Perl script? [see example below]
I'm not sure I understand the question 100%, but if you want to create a unique number to use as a key, you can create an Oracle sequence and use it to assign numbers: my ($key) = $dbh->selectrow_array('select myseq.nextval from dual'); If you ever move away from Oracle, you could come up with another technique. There's a Perl FAQ article that shows a file-based technique: perldoc -q increment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]