Multiplying in a Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table with the following data:

IdStbd IdIndctr Index
1 1 1.1
1 2 1.2
1 3 1.3

I need to have a query that take the Index numbers and multiplied them.
I won't know how many indexes I will have.

How can I do that?

Thanks a lot!!
Lina
 
I have a table with the following data:

IdStbd IdIndctr Index
1 1 1.1
1 2 1.2
1 3 1.3

I need to have a query that take the Index numbers and multiplied them.
I won't know how many indexes I will have.

How can I do that?

Thanks a lot!!
Lina

you mean you can't use a totals query and just use Count()?
 
Add the log of the index and then convert that back into a number.

SELECT Exp(Sum(Log(Index))) as IndexProduct
FROM YourTable

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
I do not really know what you mean.
What I need is to multiply =1.1 * 1.2 * 1.3

Thanks a lot, Lina
 
Forgot to mention that all the values must be a positive non-zero value - no
nulls, no zeros, no negative numbers.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Hey John, you are a genious!!
Thanks a lot!!

John Spencer said:
Forgot to mention that all the values must be a positive non-zero value - no
nulls, no zeros, no negative numbers.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top