I am trying to combine 2 queries.
The following query shows the HOH (Head of House hold) with no children:
SELECT HOH.HOHID, HOH.Lastname, HOH.Firstname, (Select Count (*) From Children
Where HOH.HOHID = Children.HOHID) AS TotalChildren
FROM HOH
WHERE (Select Count (*) From Children
Where HOH.HOHID = Children.HOHID) = 0
ORDER BY LastName;
The following query shows the HOH (Head of House hold) with no spouse:
SELECT HOH.HOHID, HOH.Lastname, HOH.Firstname, (Select Count (*) From Spouse
Where HOH.HOHID = Spouse.HOHID) AS Spouse
FROM HOH
WHERE (Select Count (*) From Spouse
Where HOH.HOHID = Spouse.HOHID) = 0
ORDER BY LastName;
I want to create a query that shows the HOH (Head of House hold) with no spouse or chidren:
Thank you
Chillay
The following query shows the HOH (Head of House hold) with no children:
SELECT HOH.HOHID, HOH.Lastname, HOH.Firstname, (Select Count (*) From Children
Where HOH.HOHID = Children.HOHID) AS TotalChildren
FROM HOH
WHERE (Select Count (*) From Children
Where HOH.HOHID = Children.HOHID) = 0
ORDER BY LastName;
The following query shows the HOH (Head of House hold) with no spouse:
SELECT HOH.HOHID, HOH.Lastname, HOH.Firstname, (Select Count (*) From Spouse
Where HOH.HOHID = Spouse.HOHID) AS Spouse
FROM HOH
WHERE (Select Count (*) From Spouse
Where HOH.HOHID = Spouse.HOHID) = 0
ORDER BY LastName;
I want to create a query that shows the HOH (Head of House hold) with no spouse or chidren:
Thank you
Chillay