I have the following tables:
employees general info
employees job info
employees leaves
employees medical info
employees penalties
employees Bonuses
employees Training Courses
employees Promotions
employees Insurance
Relationships are between the (employees general info) table and each table is one to many by the field (employeeNo).
Please see the attached image.
I need to let the user define multiple criterias in all of these tables:
for instance the user wants to display all employees that meet the following criteria:
Nationality: Egyptian (this field is in general info table) AND
Bonus(amount): >= 3000 AND
Training course destination: U.K
..... and so on
Of course I'm just giving an example, I want the user to be able to define whatever criteria he wants (even if the fields are in multiple tables as in my example).
is this possible, if it is, how can I achieve it?
What would the miracle SQL statement be?
employees general info
employees job info
employees leaves
employees medical info
employees penalties
employees Bonuses
employees Training Courses
employees Promotions
employees Insurance
Relationships are between the (employees general info) table and each table is one to many by the field (employeeNo).
Please see the attached image.
I need to let the user define multiple criterias in all of these tables:
for instance the user wants to display all employees that meet the following criteria:
Nationality: Egyptian (this field is in general info table) AND
Bonus(amount): >= 3000 AND
Training course destination: U.K
..... and so on
Of course I'm just giving an example, I want the user to be able to define whatever criteria he wants (even if the fields are in multiple tables as in my example).
is this possible, if it is, how can I achieve it?
What would the miracle SQL statement be?