This email was about Access Query.
Plz check this question in dotnet spider on sqlserver.
I need the output in access.I dont have proper touch
in access.Can u help this out by checking.
Thnks in advance.
The post talks about a database Table with CityName, PersonName and Sex (M/F). A person wants to get List of all cities and number of Males and Females in output. The person who sent me an email answered in the post with correct query. But she had troubles getting it in MS Access. This is how access we can write the query in Access. I checked it it works.
SELECT CityName, SUM(IsMale) As NoOfMales, SUM(IsFemale) As NoOfFemales
SELECT CityName, IIF(Sex='M', 1,0)As IsMale, IIF(Sex='F', 1,0) as IsFemale
) GROUP BY CityName;