By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,479 Members | 2,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,479 IT Pros & Developers. It's quick & easy.

I got a databse here that was done a little different

P: n/a
This database has this in the table.
idnumber visitno record1 record2
1 1 3
1 2 3

in a query how do I get the average of the record?
I know its (3+3)/2 but I can't figure out how to average out 2 visits.

thanks big time this should be simple, do you use idnumber and forget
the visitno ?

again thanks for any help

Jerry
May 10 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Very simple - use the group by feature of the select query. This
should allow you to compute your average.

May 10 '06 #2

P: n/a
Try this...

Select IdNumber,Avg(Record1+Record2) as Average From Table1 group by
IdNumber

-Saran

May 10 '06 #3

P: n/a
sparks wrote:
This database has this in the table.
idnumber visitno record1 record2
1 1 3
1 2 3


What do record1 and record2 represent? Are they two separate attributes
of a record, or are they the same thing except two sepaate instances of
that thing.

If the latter, your database should be trashed immediately and redesigned.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
May 10 '06 #4

P: n/a
this was stupid of me to post this this way.
I am very sorry...it was late and I was tired.

it should have been
This database has this in the table.
idnumber visitno record1 record2
1 1 3 4
1 2 3 4

they have 2 forms visit1 and visit2 tied to the same table.
so now that its all entered they want the average of the records
over both visits
so I was doing 3+3 and 4+4 for each idnumber and getting the average
over both visits

I guess after this they will want the averages displayed as well.
I don't know I inheritated this one 2 yrs after the guy quit....weeeee
LOL

On Wed, 10 May 2006 01:02:49 -0230, Tim Marshall
<TI****@PurplePandaChasers.Moertherium> wrote:
sparks wrote:
This database has this in the table.
idnumber visitno record1 record2
1 1 3
1 2 3


What do record1 and record2 represent? Are they two separate attributes
of a record, or are they the same thing except two sepaate instances of
that thing.

If the latter, your database should be trashed immediately and redesigned.


May 10 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.