Iam try to create an append query, in order to, insert records into an already existing field (using 2 different tables).
Basically, I want to insert the dates from a column (field) labeled “GraduationDate” that is located in a table labeled “OrderHeader” into a table labeled “OrderDeliveryAlt” in a column (field) also labeled “GraduationDate” but only update that field that contains the same “OrderNu” as the date.
For example, everywhere there is the OrderNu “T0020204” with the graduation date of 5/15/2018 (in the OrderHeader table) I want that graduation date to be inserted into the graduation date in the OrderDeliveryAlt table with that corresponding OrderNu.
Here is what I have but it doesn’t work:
INSERT INTO OrderDeliveryAlt ( GraduationDate )
SELECT OrderHeader.GraduationDate
FROM OrderHeader;
Which is the correct SQL code to use in this case? Should I use an append query or Update Query?
Basically, I want to insert the dates from a column (field) labeled “GraduationDate” that is located in a table labeled “OrderHeader” into a table labeled “OrderDeliveryAlt” in a column (field) also labeled “GraduationDate” but only update that field that contains the same “OrderNu” as the date.
For example, everywhere there is the OrderNu “T0020204” with the graduation date of 5/15/2018 (in the OrderHeader table) I want that graduation date to be inserted into the graduation date in the OrderDeliveryAlt table with that corresponding OrderNu.
Here is what I have but it doesn’t work:
INSERT INTO OrderDeliveryAlt ( GraduationDate )
SELECT OrderHeader.GraduationDate
FROM OrderHeader;
Which is the correct SQL code to use in this case? Should I use an append query or Update Query?