Hello everyone,
Having a problem trying to build an update query to insert another column to an existing table. I forgot to add in SalesPerID column(in table OrderDetails) to match SalesPer column. The problem is there are 5,000 lines of orders and I don't want to enter this manually. I have SQL server 2012 and tried to add the column in that way - but would like to know how to do this in Access(or SQL). So I have a table with SalesPerID and would like to query that table to update or append to OrderDetails table. Here is what the table looks like:
Trying to Build relationships amongst tables so I can use JOINS in my query's - so instead of trashing everything and starting over because I forgot to add Key fields I want to insert the data I need.
Table:SalesPerson
SalesPerID already exists on this table
SalesPerID FirstName LastName Branch SalesPer 1 Bob Smith Houston BS 2 Sherry Wiley Boston SW
Tables: OrderDetails. SalesPerID is the Field or Column that I want to insert - it doesn't exist. Would like to do an update or append query using a JOIN on table SalesPerson. Also see attachment on Database's Relationship diagram - OrderDetails is actually called MO2012to2014 on the attachment....
OrderID Date Company JobDesc SONUM SalesPer SalesPerID 1 6/30/14 ACME Drilling 12345 BS 1 2 7/1/14 Pipe Supply Welding 12356 SW 2