I have a challenge with a query. I have a table person which are in a table department which is in a company table.
The PK in person is a personal id, the 9. number in the key to tell if you're male or female, i.e. if the number is odd then the person is male and if it's even it's female.
What i want is to create a query which show the number of male and female in each department in each company.
I found out that i must use this if statement:
Iif((mid(personID,9,1) mod 2) <> 0 then something...
How can i implement this in a query? I know how to do it in vb code.
Regards
Pser
The PK in person is a personal id, the 9. number in the key to tell if you're male or female, i.e. if the number is odd then the person is male and if it's even it's female.
What i want is to create a query which show the number of male and female in each department in each company.
I found out that i must use this if statement:
Iif((mid(personID,9,1) mod 2) <> 0 then something...
How can i implement this in a query? I know how to do it in vb code.
Regards
Pser