473,394 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

putting totals in an access table

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
1 1117
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Darren | last post by:
Hi, I am trying to write an Aged Debtors report in MSquery, I have created all of the columns sucessfully, I just need to have totals of each column at the bottom of the report - how can this be...
4
by: New Guy | last post by:
I'm trying to work with a system that somebody else built and I am confounded by the following problem: There is a table of payments and a table of charges. Each client has charges and payments...
6
by: KashMarsh | last post by:
Trying to show running totals on a report, except it needs to show one total amount and values being subtracted from it. For example, the report shows a Total Inventory amount (TotInvAmt). And...
4
by: Steve_s | last post by:
Hi I am having problems totalling a particular field in a subform.I am using Access 2003. The subform is based on a query which selects records with various financial information. I have 5 text...
10
by: rdemyan via AccessMonster.com | last post by:
I have a subform that displays around 10 fields. Most of the values shown result from some complex calculations. To make it easy, I have stored the results in a temporary table and then all I...
9
by: JJM0926 | last post by:
I'm trying to create a running totals query in access 97. I have followed the directions on how to do it from Microsofts website article id 138911. I took their code they had and replaced it with...
8
by: elias.farah | last post by:
Hello Everyone, I'm having some very weird behavior on a couple of Access forms. (Not all forms, just some of them). The forms have been working for years, under Access XP/2003 etc, and last...
1
by: maffonso | last post by:
Hi guys, I have created a VB code through 'Record a new Macro'. This code builds a pivot table.The problem is that the table created has totals but Id like a pivot table without totals. How can i...
2
by: peter1234 | last post by:
I am trying to produce study notes for ACCESS, and for many days I am stuck trying to produce totals and subtotals for table ‘Order Details’ from ‘Northwind Sample Access Database’. The fact that I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.