Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
steelkilt
Constraint Violating Yak Guru
255 Posts |
Posted - 2006-02-10 : 12:16:24
|
| I'm doing a database for a group that wants to use the following text as their primary key:AB-1AB-2AB-3...AB-1000AB-1 thru AB-999 is to represent a specific group of peopleAB-1000 thru AB-500000 is to represent another specific group of people.I've been trying with little success to talk them out of this, explaining that non-numeric primary keys are not properly searchable with mathematical operators, etc...Anyone know a good solution to the above? Again, I need a primary key with the "built-in" ability to distinguish between two different groups of people.thanks |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2006-02-10 : 12:23:21
|
| Well, my first observation would be that if all the values are prefixed with "AB-", then those characters contain no informational value. |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2006-02-10 : 12:32:29
|
| 1 data item holding 2 pieces of information....classic example of underanalysis of the problem/data....please don't secumb!You need to convince them of a better way to tackle this. ...for instance, presuming your tble is one of customersa) primary key = customer numberb) extra field identifying what type of customer each is.....having an implicit/reserved range of customer numbers to denote what type of customer each is, is the best way to handicap your system in the future..... |
 |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2006-02-10 : 15:47:37
|
| Maybe it's the blood group.rockmoose |
 |
|
|
|
|
|