Auto populate Foreign Key with Primary Key when importing
I’m building a Costumer Inquiry database to keep a track of all the e-mail inquiries received. I have created 3 tables, one for customers, one for inquiries and another one for answers, plus a join table between inquiries and answers. The problem that I have is that I’m importing a spread sheet with all the inquiries and costumer’s details, and I need help in creating a script or something that auto populates the foreign key in the Inquiry table with the value of the primary key from the Customer table.
I would really appreciate some help.