I really need some ideas to acomplish this task..
I need to Insert the data obtained by this QUERYA to a table called EmploymentExp which have the same fields as the query with an ADDITIONAL ID field which is incremented by one everytime a new record is inserted.
QUERYA:
SELECT Candidates.InternalID,Employment.CandidateID, Employment.IDEmpl,empSector.Sector,empSector.SubSector,Employment.experience
FROM Employment INNER JOIN empSector
ON Employment.SectorID = empSector.ID
INNER JOIN candidates
ON candidates.CandidateID = Employment.CandidateID
where Candidates.InternalID is not NULL or Candidates.InternalID<>''
After inserting that data to EmploymentExp I need to use
EmploymentExp.INTERNALID=Candidates.INTERNALID
to update data on "EmploymentExp" table in case any update happens on "candidates" table. Also if an new InternalID that doesn't exist on "EmploymentExp" is created on candidates table this should be detected and inserted to EmploymentExp with its related data.
I will appreciate any help
Thanks
Raul
I need to Insert the data obtained by this QUERYA to a table called EmploymentExp which have the same fields as the query with an ADDITIONAL ID field which is incremented by one everytime a new record is inserted.
QUERYA:
SELECT Candidates.InternalID,Employment.CandidateID, Employment.IDEmpl,empSector.Sector,empSector.SubSector,Employment.experience
FROM Employment INNER JOIN empSector
ON Employment.SectorID = empSector.ID
INNER JOIN candidates
ON candidates.CandidateID = Employment.CandidateID
where Candidates.InternalID is not NULL or Candidates.InternalID<>''
After inserting that data to EmploymentExp I need to use
EmploymentExp.INTERNALID=Candidates.INTERNALID
to update data on "EmploymentExp" table in case any update happens on "candidates" table. Also if an new InternalID that doesn't exist on "EmploymentExp" is created on candidates table this should be detected and inserted to EmploymentExp with its related data.
I will appreciate any help
Thanks
Raul