PDA

View Full Version : Quick Question re: MS Access


divine
19-04-2009, 20:03
PM me or MSN (rich_j666@hotmail.com) me please, just want a quick hand with what should be a very simple system but my head is in a muddle and i've not used Access for years.

divine
19-04-2009, 20:50
Just in case it makes anyone feel more inclined/able to help all i'm trying to do is...

Have 1 table (I think) with about 10 fields in it and a few dozen records.

I want to then be able to query it so I can pull up all the records for a certain field with a certain value.

i.e say the field was Forename, I want to be able pick out all the records where that is 'Dave' so I can compare the rest and be able to make statements about the data like 'Of everyone called Dave, 5 of them have brown hair'

Atm I just have the total numbers in excel so all I can do is say 'there are 7 people called dave' and 'there are 12 people with brown hair' but not link the two.

Anyone help? It should be embarrassingly simple but I can't figure it out for the life of me, i've not touched a database for about 5 years.

Mark
20-04-2009, 01:21
SELECT * FROM <table> WHERE Forename = 'Dave';

SELECT HairColour,COUNT(HairColour) FROM <table> WHERE Forename = 'Dave' GROUP BY HairColour;

divine
20-04-2009, 01:46
Cheers, I shall give that a go in a bit!