Join two tables and save and add to current tables:
Here is the scenario:
Everyday we need to to append or add the list of all records(Schedules and Dispatch) that we made into new Tables which is RECORDS TABLES.Then after that Schedules and Dispatch Table need to be delete all the data/records for that day.
I already made the the two tables join
here the code:
SELECT Dispatch.PlateNo, Dispatch.FirstName, Dispatch.LastName, Dispatch.MiddleName , Dispatch.TADDispatch, Schedules.LineNo, Schedules.DepartureTime, Schedules.DepartureTimes FROM Dispatch LEFT OUTER JOIN Schedules ON Dispatch.PlateNo = Schedules.PlateNo;
I don’t have idea how to save or insert that into Records Tables and Delete all the data/record on Dispatch and Schedules
I’m using Microsoft Access and VB.Net
You should be able to do the Insert like this:
and then run a Truncate statement on your original two tables to delete the rows.