mehdi
11-20-2009, 03:32 PM
Hi Guys
I do n't know much of access. I need to generate serial numbers in my database. I 've been told i need to do this two queries. But I have no idea how to do this. I look at few previous posting in the forum. But still confuse how to do this. Can some one guide me please?
Thanks
ajetrumpet
11-20-2009, 03:45 PM
need serial numbers? open a table, make an autonumber field, and set it to RANDOM instead of INCREMENT.
boblarson
11-20-2009, 03:52 PM
need serial numbers? open a table, make an autonumber field, and set it to RANDOM instead of INCREMENT.
hmmm, given that the word SERIAL essentially means SEQUENTIAL, random would not be the way to go. It would need INCREMENT. But, I would not use an autonumber. I would instead use a DMax + 1 situation.
mehdi
11-20-2009, 03:57 PM
Thanks Adam
But I for got to mention that, the Serial number has to be generated by concatenating some other filed in the same table and some random numbers.
Mehdi
boblarson
11-20-2009, 04:01 PM
Thanks Adam
But I for got to mention that, the Serial number has to be generated by concatenating some other filed in the same table and some random numbers.
Mehdi
What is it for? How many digits are you looking for? What is going to be the purpose of this?
ajetrumpet
11-20-2009, 04:08 PM
Thanks Adam
But I for got to mention that, the Serial number has to be generated by concatenating some other filed in the same table and some random numbers.
Mehdi
Mehdi,
I gave an answer to the question. Sometimes, but very rarely, it teaches people how to be specific. As for Bob, he's too specific for his own good. ;) thanks for the philosophical response bob, but I'm nowhere near smart enough to understand statements like that. Just say that you love me and that'll be good enough
boblarson
11-20-2009, 04:11 PM
Just say that you love me and that'll be good enough
Of course, how could I not :D
mehdi
11-20-2009, 04:13 PM
This for my assignment. I am required to build a database for a bicycle manufacturing company. I need to assign a serial number to each bicycle after it is manufactured. I haven’t design the data base entirely yet. But I was thinking, what would be the best way to generate this serial numbers. The length of the serial numbers is not important since I can decide on that myself. But obviously is has to be unique number.
Mehdi
boblarson
11-20-2009, 04:16 PM
This for my assignment. I am required to build a database for a bicycle manufacturing company. I need to assign a serial number to each bicycle after it is manufactured. I haven’t design the data base entirely yet. But I was thinking, what would be the best way to generate this serial numbers. The length of the serial numbers is not important since I can decide on that myself. But obviously is has to be unique number.
Mehdi
Normally a bicycle would be assigned a serial number in the order it is built
000001
000002
000003
etc.
For this DMax + 1 would be the best and you can then format the DISPLAY of it to have the leading zeroes.