Is there a free "random serial generator?"

dstebbins

Member
I'm creating a database using OpenOffice Base. I'm wanting to set a unique serial number as the primary key for each entry, with exactly 50 characters.

I don't care what the serial numbers are; they're only used for the purpose of making each entry have a unique primary key. So, I'd like them to be randomly generated, subject to the following parameters:

1. Exactly 50 characters, no more no less.
2. No repeats allowed.
3. It can include non-alphanumeric characters, but they have to appear on a standard American English keyboard.

Anyone know where I can get a mod for Open Office that can do this for me?
 
Why would you want this over something like an incremental value for each record?
 
I haven't used the Open Office DB but in something like MySQL you would just have your table auto-increment on that field. Then whenever you add new data it automatically adds to the number for each entry, which would be good for something like a primary key.

Similar to:
CREATE TABLE MyTable
(
ID int NOT NULL AUTO_INCREMENT,
Product varchar(255) NOT NULL,
Serial varchar(255),
PRIMARY KEY (ID)
)
 
Last edited:
Back
Top