I need to write a procedure in mysql that runs every night and performs the following:-
For each 'id' from 'associate' table find if there is an entry in 'status table' for a particular 'department' . If there is an entry then move on to next 'id' else insert a row in status table for that id.
Associate Table
Assoc_Id
Assoc_Project
Assoc_Assigned_On
Status Table
Sub_id
Assoc_Id
Sub_on
Department
I just have no clue about how to do this. Any help will be highly appreciated.
Thanks in advance