Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 14th, 2005, 02:56 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to fdoosey
Default Multiple calulated fiels in one query?

I have a table of information, including a status field. What I have so far is a list with a calculated field for each existing status for a given grouping. Example:

FieldA | FieldB | Status | Count
201 | 305 | 10 | 150
201 | 305 | 20 | 106

And so on. What's straining my head is trying to get each separate count into a different field into another table in one sweep. If I had the luxury of SQL Server (which I don't), making a stored procedure would be pretty simple. AFAIK, Access doesn't give me such creature comforts.

That said, is there any way I can parse out each field in one sweep, or will I have to do some more hoops-jumping?

  #2 (permalink)  
Old February 15th, 2005, 09:17 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am not exactly sure of the math you are doing with these fields. What I can tell you is that Access can do what SQL stored procedures do.

What you need to do is to store basic data in one table, then create a query that does your caluclations and store the result of those calculations in that query (well, not really stored). Then you can write a function or sub that moves the results of that query to another table, if for some reason you want the calculations stored in another table, which they shouldn't be, except perhaps for archiving, or if the database is very large, for OLAP.

If you can provide the basic (calucalted on) fields and table structure, I am sure we can get the calculations you want, and the procedure for moving the query results to another table.

HTH


mmcdonal


Similar Threads
Thread Thread Starter Forum Replies Last Post
date fiels insertation problem geek.net ADO.NET 1 March 7th, 2006 06:36 AM
Need help : how to query multiple categories will2kready SQL Language 0 January 10th, 2006 09:37 PM
Multiple field query PLUS Durwood Edwards Access 5 July 26th, 2005 09:08 AM
opening other fiels? vb certified Pro VB.NET 2002/2003 5 June 14th, 2005 05:30 PM
Multiple Joins in Multiple Table Search query pookster Access 4 September 23rd, 2004 03:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.