I have a table that gets a row populated to it with a piece of code..one of the fields in the table holds a 4 digit number that is generated with a random number function. What I was wondering was I want to generate a number that has not been used before?
I was thinking of creating a view of the numbers that are already used...compare that with the new number that is generated and see if it exists in the view ..if a good number ..continue on with the code ..if a bad number generate again and compare again..etc..
Just wondering if this is the best approach...
Any help would be much appreciated..