AnsweredAssumed Answered

Updating Primary Keys

Question asked by danjamins on Aug 17, 2015
Latest reply on Aug 18, 2015 by danjamins


Updating Primary Keys


Hi All,

I'm building out a new CRM for a company, they are using a web based solution now.


What I'm trying to do is update the primary keys in the system to just a serialized number in fmp. 


How would I go about updating the key in the parent table (table A) and updating the foreign key of it in the child table (Table B) across all records? 


I've never had to do this before, but the data structure of the database they have is all funky and I really don't want to have to manually clean this up as there are 11K or more records in this database under Table A.

I figured I could write a script with a loop that uses the replace field contents somehow, but I can't quite wrap my head around this. 

Any help is much appreciated.