I have two very messy tables, I have normalized them into 11 tables in a new database. Data comes in once a month (about 20 000 records) into the old tables from another company. I have added PK's to the new tables and made a dts package to import the data. The PK's get put in automatically when the package executes. The problem is that I don't know how to reference the keys properly in foreign tables. For example, if the old table looked like this:
Order, Product, Customer, Date
and the new tables looked like this:
OrderID ProductID CustomerID Date
CustomerID Firstname Lastname etc....
How do I get the correct CustomerID to go to the correct record in the Orders table (and all the other tables referencing each other)?
I'm guessing it has something to do with referencing the old table in the old db, but I'm clueless how to go about it as I'm very new to sql.