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

putting totals in an access table

P: n/a
Hi,

I had posted this before and would appreciate any ideas on this. I'm
trying to put a "total" for every row in an access table.
Unfortunately, some rows have "15+" in the "total" field instead of the
word "total".

Is there some sql code or a design method technique for finding all
those rows which have no "total" but have "15+" and converting those
"15+" to "total". If there already is a "total" in addition to "15+",
it's ok nothing needs to be done. This is only if there is a 15+ and no
total.

Here is a sample of the table to make it easier to understand:

country year agegrouping
Australia 1992 15+
Australia 1992 total
France 1993 total
Germany 1992 15+
etc.

There should be an agegrouping "total" for each country and year.

As mentioned, if there is a 15+, how could I change all the "15+" in the
original table to "total" when there is no "total" for that country and
year.

Thanks, and looking forward to your ideas.

Dan Graziano



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"dan graziano" <d3********@hotmail.com> wrote in message
news:41**********************@news.newsgroups.ws.. .
I had posted this before and would appreciate any ideas on this. I'm
trying to put a "total" for every row in an access table.
Unfortunately, some rows have "15+" in the "total" field instead of the
word "total".

Is there some sql code or a design method technique for finding all
those rows which have no "total" but have "15+" and converting those
"15+" to "total". If there already is a "total" in addition to "15+",
it's ok nothing needs to be done. This is only if there is a 15+ and no
total.

Here is a sample of the table to make it easier to understand:

country year agegrouping
Australia 1992 15+
Australia 1992 total
France 1993 total
Germany 1992 15+
etc.

There should be an agegrouping "total" for each country and year.

As mentioned, if there is a 15+, how could I change all the "15+" in the
original table to "total" when there is no "total" for that country and
year.

Thanks, and looking forward to your ideas.

Dan Graziano


Create and execute this query:
UPDATE TableX SET TableX.agegrouping = 'total'
WHERE ((InStr(1,[agegrouping],'15+')>'0'));

Every "15+" or "abc15+plk" will be updated into "total".

Ciao
Bruno
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.