I have 4 queries below that each query should return different results due to the qualifications in WHERE.
What I want is the output is showing in a row i.e.
Qry1 Qry2 Qry3 Qry4
Dept A 11 0 1 9
Dept B 3 4 4 7
Dept C 17 9 5 2
....
Pls advise.
thx so much
Qry 1)
select Dept, count (A.AssociateID) as TheCnt
from MedicalINFO M, AssociatePersonal A
where M.AssociateID = A.AssociateID
and FluShotDate between '01-01-2008' and '12-31-2008'
and AccDec ='Accept' and InfluenzaVaccine > '1900-01-01'
group by Dept
order by Dept
Qry 2)
select Dept, count (A.AssociateID) as TheCnt
from MedicalINFO M, AssociatePersonal A
where M.AssociateID = A.AssociateID
and FluShotDate between '01-01-2008' and '12-31-2008'
and AccDec ='Accept'
and (InfluenzaVaccine = '1900-01-01' or
InfluenzaVaccine is null or
len(InfluenzaVaccine) =0)
group by Dept
order by Dept
Qry 3)
select Dept, count (A.AssociateID) as TheCnt
from MedicalINFO M, AssociatePersonal A
where M.AssociateID = A.AssociateID
and FluShotDate between '01-01-2008' and '12-31-2008'
and AccDec ='Decline' and InfluenzaVaccine > '1900-01-01'
group by Dept
order by Dept
Qry 4)
select Dept, count (A.AssociateID) as TheCnt
from MedicalINFO M, AssociatePersonal A
where M.AssociateID = A.AssociateID
and FluShotDate between '01-01-2008' and '12-31-2008'
and AccDec ='Decline'
and (InfluenzaVaccine = '1900-01-01' or
InfluenzaVaccine is null or
len(InfluenzaVaccine) =0)
group by Dept
order by Dept
What I want is the output is showing in a row i.e.
Qry1 Qry2 Qry3 Qry4
Dept A 11 0 1 9
Dept B 3 4 4 7
Dept C 17 9 5 2
....
Pls advise.
thx so much
Qry 1)
select Dept, count (A.AssociateID) as TheCnt
from MedicalINFO M, AssociatePersonal A
where M.AssociateID = A.AssociateID
and FluShotDate between '01-01-2008' and '12-31-2008'
and AccDec ='Accept' and InfluenzaVaccine > '1900-01-01'
group by Dept
order by Dept
Qry 2)
select Dept, count (A.AssociateID) as TheCnt
from MedicalINFO M, AssociatePersonal A
where M.AssociateID = A.AssociateID
and FluShotDate between '01-01-2008' and '12-31-2008'
and AccDec ='Accept'
and (InfluenzaVaccine = '1900-01-01' or
InfluenzaVaccine is null or
len(InfluenzaVaccine) =0)
group by Dept
order by Dept
Qry 3)
select Dept, count (A.AssociateID) as TheCnt
from MedicalINFO M, AssociatePersonal A
where M.AssociateID = A.AssociateID
and FluShotDate between '01-01-2008' and '12-31-2008'
and AccDec ='Decline' and InfluenzaVaccine > '1900-01-01'
group by Dept
order by Dept
Qry 4)
select Dept, count (A.AssociateID) as TheCnt
from MedicalINFO M, AssociatePersonal A
where M.AssociateID = A.AssociateID
and FluShotDate between '01-01-2008' and '12-31-2008'
and AccDec ='Decline'
and (InfluenzaVaccine = '1900-01-01' or
InfluenzaVaccine is null or
len(InfluenzaVaccine) =0)
group by Dept
order by Dept