Newbie - related tables

Status
Not open for further replies.

gavin101

New Member
Please help:
I have an employee table and an employees training table. The training table will have multiple employee records.

I want to disallow deleting of a record in the employee table if that employee already has at least one training record. Is this possible?
 
Hi Gavin

I dont think this is easily doable, at a really rough guess I would say you would need to do this:

left join your employee table to the training table
group the employee table on the employee id
create a custom table template to count the number of records in each group
if its 1 and the training data is null then you can show the delete link
if there are more than one record in the group then you hide the delete link
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top