nickmollberg
Programmer
I have three tables, 'appointment', 'appointmentdetailstemplate' and 'appointmentdetails'.
When a new appointment record is added to the 'appointment' table, 300 records should be added to 'appointmentdetails'. What should happen is I take the 300 records in 'appointmentdetailstemplate', change the appointmentID on all 300 records, then insert these 300 changed records into 'appointmentdetails'.
So... to insert a new appointment into the database...
Add a single record to 'appointment'
Take 300 records from 'appointmentdetailstemplate' change the appointmentID for each record, then add all these modified records to 'appointmentdetails'.
This should be relatively simple, but I need to syntax for copying records out of one table, and inserting them into another. Any suggestions here would be very helpful.
Thank you!