davehob

Key formatting

Discussion created by davehob on Nov 28, 2011
Latest reply on Nov 29, 2011 by davehob

I sometimes get problems with Finds etc. which would be avoided if they keys in the solution were formatted differently. For example, in a "people" table, the primary key was initially designed as an auto-enter serial no., starting with PPL1. We're now up to PPL9137, and in some situations I've been tripped up by, say, PPL913 appearing in a list, and a PatternCount returning 2. Obviously this can be avoided, by using "==" in Finds, including a carriage return when looking for keys in lists, etc., but it strikes me that this would all have been easier if the key had been defined in the first place as starting from "PPL000001", so that all values would always be unique.

 

But then I wondered if there's an argument AGAINST doing it this way. Obviously there's the overhead of storing those leading zeroes, and it's also imposing an upper limit on the number of records. But, assuming that I'm comfortable with these considerations, is there anything else I should be worried about, before I set about converting the existing data?

 

Dave.

Outcomes