- Local time
- Today, 14:49
- Joined
- Sep 12, 2006
- Messages
- 16,065
if you DO have the number and it is ALWAYS known, then there is no reason not to use it as a PK
personally, i would still be inclined to use an autonumber, and just keep the CHI as a keyed field in the master table, but if you can't , you can't.
It's more the general principle of having the PK as a bit of data that you will always know.
Your post seemed to indicate you had "issues" or "problems" with them - eg CHI's being entered incorrectly, and needing to be amended. You are better off not using a PK that may need to change.
OK - text or number
number (long data type) is limited to 2 billion approx - so if the CHI numbers exceed this, then you can't use a number - so this effectively limits you to a 9 digit number - also if the number ever starts with a zero, then it is text, not number anyway.
I think a serial number is generally TEXT, even if it is all numeric, if you see what I mean - I think that is your conclusion, anyway.
personally, i would still be inclined to use an autonumber, and just keep the CHI as a keyed field in the master table, but if you can't , you can't.
It's more the general principle of having the PK as a bit of data that you will always know.
Your post seemed to indicate you had "issues" or "problems" with them - eg CHI's being entered incorrectly, and needing to be amended. You are better off not using a PK that may need to change.
OK - text or number
number (long data type) is limited to 2 billion approx - so if the CHI numbers exceed this, then you can't use a number - so this effectively limits you to a 9 digit number - also if the number ever starts with a zero, then it is text, not number anyway.
I think a serial number is generally TEXT, even if it is all numeric, if you see what I mean - I think that is your conclusion, anyway.