Link to home
Start Free TrialLog in
Avatar of Nolanc
Nolanc

asked on

More Than One Counter In SQL Statementt

Hi

Please Consider the following SQL Statement:

sSQL = "Select SalLevel, Count(Gender = 'Male') As MaleCnt, Count(Gender = 'Female') As FemCnt From Employees  Group By SalLevel"

When I execute the above statement, I get the Grouping correct except that my FemCnt is Equal to my MaleCnt. And my MaleCnt is correct.

Can somebody please detect what I am doing wrong.

I am using VB.Net 2010 and running under Windows 7.

Many thanks
ASKER CERTIFIED SOLUTION
Avatar of Lee Wadwell
Lee Wadwell
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nolanc
Nolanc

ASKER

Hi lwadwell,

Brilliant solution. Thank you.