all groups > sql server (alternate) > november 2006 >
You're in the

sql server (alternate)

group:

adding up column values (asp & access 2000)


adding up column values (asp & access 2000) Dan
11/29/2006 1:27:24 AM
sql server (alternate):
Hi

I've got a quandry - I have a detailed database that handles advert
orders between a design agency and printers / magazines etc.

I want to add up the total spent by the client and put the results to a

field.

I've actually done that using a query table in access - it should be
quite simple as i can bind the 'total amount' to my table - the only
thing it does not currently do is filter the total based on the month
selected.

For example if you look at
http://www.daneverton.com/dg2data/months/2006-12.asp

The data here is filtered by the issue equaling Dec-2006

The actual order total is =A313,622 but the column is showing the total
for all entries to date (a years worth =3D =A3 422,048)

I'm sure that there is only a basic tweak required but i'm banging my
head over what to do

The sql is "SELECT * FROM monnodraught, q_monodraught_total WHERE
[Issue / Edition] LIKE ? ORDER BY Publication ASC"

Any help gladly received.
Re: adding up column values (asp & access 2000) Douglas
11/30/2006 11:19:41 PM
Hi Dan,

What is the SQL behind: q_monodraught_total ?
Quote:
The sql is "SELECT * FROM monnodraught, q_monodraught_total WHERE
[Issue / Edition] LIKE ? ORDER BY Publication ASC"
I'm thinking you might benefit from a SELECT SUM... query
SELECT SUM(fieldname) FROM table WHERE condition ORDER BY fieldname; =
SELECT SUM(Age) FROM Persons WHERE Age>20good luck ;o)

Cheers,
Douglas

-------------------------------------------------------------------------=
-------


[quoted text, click to view]
Hi

I've got a quandry - I have a detailed database that handles advert
orders between a design agency and printers / magazines etc.

I want to add up the total spent by the client and put the results to a

field.

I've actually done that using a query table in access - it should be
quite simple as i can bind the 'total amount' to my table - the only
thing it does not currently do is filter the total based on the month
selected.

For example if you look at
http://www.daneverton.com/dg2data/months/2006-12.asp

The data here is filtered by the issue equaling Dec-2006

The actual order total is =A313,622 but the column is showing the total
for all entries to date (a years worth =3D =A3 422,048)

I'm sure that there is only a basic tweak required but i'm banging my
head over what to do

The sql is "SELECT * FROM monnodraught, q_monodraught_total WHERE
[Issue / Edition] LIKE ? ORDER BY Publication ASC"

AddThis Social Bookmark Button