[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

MS Access Math in Query

Posted on 2003-11-12
3
Medium Priority
?
263 Views
Last Modified: 2006-11-17
I want to subtract, add, multiply, and divide different records in my Access query....How do I do this?  For example:

Select Dog, Cat, Beaver
From Animals

I want to divide Dog into Cat, and subtract Beaver from Dog.


I would like to apologize for my example and appreciate your help with this nonetheless.

cheers.

pr
0
Comment
Question by:Patrick Ryan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 1000 total points
ID: 9733717
Select Cat/Dog, Dog-Beaver from YourTable

or in the QueryBuilder:

in Column1 in the field row:  Expr1: Cat/Dog

in Column2, in the Field Row Expr2: Dog-Beaver

that will generate this SQL:

Select Cat/Dog as Expr1, Dog-Beaver as Expr2 from YourTable

the two are EXACTLY equivalent.

This of course assumes that Dog, Cat and Beaver are fields the hold NUMBERS in YourTable.

AW
0
 
LVL 39

Expert Comment

by:stevbe
ID: 10025410
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: Arthur_Wood {http:#9733717}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

stevbe
EE Cleanup Volunteer
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question