My Assistant
![]() ![]() |
|
|
Feb 18 2004, 03:43 PM
Post
#1
|
|
|
UtterAccess Enthusiast Posts: 94 From: West Palm Beach, Florida |
I have a main data table with an autonum field as the PK. I have since built a good sized DB off of this table, and now might have to change the PK to a different data field (ACK!).
Is there any easy way to do this so that I don't have to update every query, table, report, form that refers to the key in this table? If there isn't, I will leave it alone, but if there is a trick, I would love to hear it! |
|
|
|
Feb 18 2004, 03:45 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 7,132 From: Perris, California |
Why would you want to change it from an Autonumber field?
What type of field are you trying to put it as? HTH, Thanks. |
|
|
|
Feb 18 2004, 04:18 PM
Post
#3
|
|
|
UtterAccess Enthusiast Posts: 94 From: West Palm Beach, Florida |
Here are the two fields:
id (autonum, current PK): 1 task_id: MIP-1103 Someone was working with me on a portion of the DB, and suggested it. He said that if I used Task-id instead of the autonum field, I would be sure that no task_ids were duplicated, as they are imported from an external database. Do you think it even maters? Do you think how I have it now is a 'bad' database design? |
|
|
|
Feb 18 2004, 04:30 PM
Post
#4
|
|
|
UA Admin Posts: 19,244 From: Newcastle, WA |
PMFJI.
No Don't change the PK from the autonumber field! You did it right the first time. You can add an index to the Task-ID field to prevent duplicates. (IMG:http://www.gpcdata.com/images/uniqueindex.jpg) |
|
|
|
Feb 18 2004, 04:38 PM
Post
#5
|
|
|
UtterAccess Enthusiast Posts: 94 From: West Palm Beach, Florida |
Aw, right! Thanks, GroverParkGeorge! I will add an index.
By the way, what is PMFJI? |
|
|
|
Feb 18 2004, 04:40 PM
Post
#6
|
|
|
UA Admin Posts: 19,244 From: Newcastle, WA |
"pardon me for jumping in."
George |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 22nd May 2013 - 05:06 PM |