Wrox Programmer Forums
|
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
 
Old February 9th, 2004, 01:03 PM
Ben Ben is offline
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query Quandry

I want to build a query like this:

Column A: Name, Column B: Value, Column C: Individual Column B Value / Total Value of Column B

However, I'm not sure how to construct Column C, currently I have:

Individual Column B Value / SUM(Column B Values)

But this just returns 1, where am I going wrong?

Thanks
Ben
 
Old February 9th, 2004, 02:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Ben,

Does the following do the trick for you?

SELECT Table1.Name, Table1.Value, [Value]/DSum("[Value]","Table1") AS Individual
FROM Table1;

Clive

Clive Astley
 
Old February 10th, 2004, 06:30 AM
Ben Ben is offline
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Clive this worked great!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Output Query to txt file from SQL Query everest SQL Server 2005 4 November 22nd, 2007 01:49 AM
Append Query Quandry SerranoG Access 5 November 15th, 2005 06:36 PM
Syntax error in query. Incomplete query clause. dispickle ADO.NET 3 April 16th, 2004 01:04 PM
Error on Make-Table Query In Union Query rylemer Access 1 August 20th, 2003 07:42 PM
frustrating if then quandry through recordset monstermash Classic ASP Basics 5 July 18th, 2003 06:53 AM





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