By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,012 Members | 1,043 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,012 IT Pros & Developers. It's quick & easy.

Multiple table join

P: 2
First thank you very much for all your helps, and pls.

Ok, this is what I am trying to do:,
1) I am trying to get the number of employees that has completed all their
online training within 10 days of hire
2) All the employees that are has no exception(no pre-service training) and
has completed their checklist within 10 days
3) all the exception(pre-service) employees that has completed their
training within 70 days.

I have these tables, hipaa2006, hipaa101, hipaa201_inputs,
domesticviolence, securityawareness, securityawareness2006,
civilrights_input, and people_first_data.
People_first_data contains all the employees we have in our database, it
has empl_pfid col, but does not have last_modified col which all the other
tables has.

I have this queries:

1) select distinct(count(empl_pfid))
from people_first_data
left outer join tbl_domesticviolence on people_first_data.empl_pfid =
left outer join tbl_hipaa101 on
people_first_data.empl_pfid=tbl_hipaa101.employee_ pfid
left outer join tbl_hipaa201_input on people_first_data.empl_pfid=
left outer join tbl_hipaa2006 on
people_first_data.empl_pfid=tbl_hipaa2006.employee _pfid
left outer join tbl_securityawareness on
people_first_data.empl_pfid=tbl_securityawareness. employee_pfid
left outer join tbl_securityawareness2006 on people_first_data.empl_pfid=
where people_first_data.empl_pfid = '639846'
and tbl_domesticviolence.last_modified is not null
and tbl_hipaa101.last_modified is not null
and tbl_hipaa201_input.last_modified is not null
and tbl_hipaa2006.last_modified is not null
and tbl_securityawareness.last_modified is not null
and tbl_securityawareness2006.last_modified is not null

2) ( I tried union, but i only wanted one number)
select count(last_modified) as date1 from tbl_hipaa2006
select count(last_modified) as date2 from tbl_hipaa101

every help will be highly appreciated.
Oct 10 '06 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,754
Hi there,

Kindly refer to below attached link.
Oct 11 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.