Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi friends,

Here i want to display the family member where the members house no is same and also address is same. I am using the access database.here is my query
SELECT voter.SrNo, voter.YadiNo, voter.fullname, voter.houseno, voter.address, voter.Gender, voter.Age, voter.CardNo
FROM voter 
WHERE (((voter.YadiNo) Between 1 And 1) 
AND ((voter.houseno) 
In (SELECT [houseno] FROM [Voter] As Tmp GROUP BY [houseno]  HAVING Count  (houseno)>=5 and  Count  (houseno)<=5 ))) 
ORDER BY voter.houseno;

but in this query it show same house but display the different address.

I want to show same house no and same address .

Thanks in advance.
Posted
Updated 22-Oct-13 20:20pm
v3
Comments
Thanks7872 23-Oct-13 2:14am    
And where is the question?
basurajkumbhar 23-Oct-13 2:18am    
Hi sir i update my question.

1 solution

SQL
SELECT voter.SrNo, voter.YadiNo, voter.fullname, voter.houseno, voter.address, voter.Gender, voter.Age, voter.CardNo
FROM voter where  voter.YadiNo in (select voter.YadiNo from Voter group by Voter.houseno And Voter.address)




I Think It Will Work Please Try It,,Please Give Reply Its Working Or Not
 
Share this answer
 
v3
Comments
basurajkumbhar 23-Oct-13 2:42am    
Hello sir the given query is not give the output which is i want .

But thanks for solution...
basurajkumbhar 23-Oct-13 2:54am    
It is not working sir..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900