473,473 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Query (can We Divide)

75 New Member
Need help in building a query.

I have a Main Table, and it has Colums (Medication_Name, Diluent Type, Total Dose, Concentration), now I want a query where I can divide (Total Dose/Concentration) and produce Total for each Diluent Type and Mediaction.

Please help.. :)
Jun 19 '07 #1
3 1703
pukhton
75 New Member
Need help in building a query.

I have a Main Table, and it has Colums (Medication_Name, Diluent Type, Total Dose, Concentration), now I want a query where I can divide (Total Dose/Concentration) and produce Total for each Diluent Type and Mediaction.

Please help.. :)

thats what we have in Excel, but I want something like that in Access.

D5W D10W NSS None
Fentanyl 40.0 36.0 10.0 320.0
Jun 19 '07 #2
pukhton
75 New Member
here is my code... I am getting an Error under Result..any idea??

SELECT MainTable.[Medication Name], MainTable.[Diluent Type], (MainTable.[Total Dose]/MainTable.Concentration) AS Result
FROM MainTable;
Jun 19 '07 #3
JKing
1,206 Recognized Expert Top Contributor
What error are you receiving?
Jun 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Wescotte | last post by:
Here is a small sample program I wrote in PHP (running off Apache 1.3.31 w/ PHP 5.0.1) to help illustrates problem I'm having. The data base is using DB2 V5R3M0. The client is WinXP machine using...
2
by: Lin Ma | last post by:
Greetings, In my search application, user can type a number to search. I use LIKE in my query. If a query result generates over 10,000 recordsets, it may several minutes to run. Is there a...
4
by: jimh | last post by:
I'm not a SQL expert. I want to be able to write a stored procedure that will return 'people who bought this product also bought this...'. I have a user table that links to a transaction table...
0
by: Gary Carson | last post by:
Can anyone tell why the query below would throw a divide-by-zero error? The only reason I can see for the error happening would be if SUM() came out to be zero, but this never happens with the...
1
by: Tom Keane | last post by:
I pretty much want to know how to get the number of records returned from a query, so I can divide that number into another number and place it as another field in the query result. Is this...
5
by: Otie | last post by:
I have a select query that groups records together, specifically baseball players and their home runs and at-bats. I want to create a query that displays , , and and that sorts ASCENDING on the ...
1
by: jaswmil | last post by:
I have a query (see SQL below) that essentially grabs a list of all employees terminated during a specific period. What I am needing to do is to be able to take this number and then divide it by...
3
by: KishenGajjar | last post by:
I'm trying to convert a query that runs in Query Analyser (SQL Server 2000) to work in MS Access. This will then help me modify the query further and use it to create reports and such. This query...
7
by: nofear | last post by:
I have a table with 2 fields where one has duplicates and the other does not something like this: ID field1 field2 1 A A 2 A B 3 A C...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.