M
Marine 1stSgt
I am runing into an issue though that is really going to aid me in making my
counts for my Marines and Sailors. I have a database at work with personell
information to include rank, SSN, and such. What I am trying to do is write
a query in Access 2003 count my field of Rank in Groups. What I mean by this
is that I call "SNCO's" for those Marines who have the rank of SSgt, GySgt,
MSgt, 1stSgt, and MGySgt. I used the SQL below which counts fine (a numeric
value). The issue I am having is to add anadditional column that will count
Officers, such as Capt, Maj, LtCol. I have tried a couple of things and it
is not working. I do want to do this in SQL, for I am studying it in college
and I have tried adding additional where statement, but does not work. I
basically want to know how to add addition columns with the same information
I did below, which works for that one columnI want to have this all in one
query. Can anyone help this Marine 1stSgt out?
SELECT COUNT(Rank) AS SNCOs
FROM [Bravo DB]
WHERE rank='ssgt' Or rank='gysgt' Or rank='msgt' Or rank='1stsgt' Or
rank='mgysgt' Or rank='PO1' Or
rank='bmc';
counts for my Marines and Sailors. I have a database at work with personell
information to include rank, SSN, and such. What I am trying to do is write
a query in Access 2003 count my field of Rank in Groups. What I mean by this
is that I call "SNCO's" for those Marines who have the rank of SSgt, GySgt,
MSgt, 1stSgt, and MGySgt. I used the SQL below which counts fine (a numeric
value). The issue I am having is to add anadditional column that will count
Officers, such as Capt, Maj, LtCol. I have tried a couple of things and it
is not working. I do want to do this in SQL, for I am studying it in college
and I have tried adding additional where statement, but does not work. I
basically want to know how to add addition columns with the same information
I did below, which works for that one columnI want to have this all in one
query. Can anyone help this Marine 1stSgt out?
SELECT COUNT(Rank) AS SNCOs
FROM [Bravo DB]
WHERE rank='ssgt' Or rank='gysgt' Or rank='msgt' Or rank='1stsgt' Or
rank='mgysgt' Or rank='PO1' Or
rank='bmc';