I have noticed something odd on one of my queries. Maybe someone can
help or explain.
I am using the GroupBy function on all my rows except for pulling "Min"
StartDate, "Max" EndDate, and "Min" StartTime and "Max" StartTime.
Problem is though, when I also pull "Count" on the Enrolment column, in
the same query, I notice the Enrolment count is double or triple what
it is suppose to be. It looks like I can use either Min/Max, or Count,
but not both in the same query. Is this an SQL rule, or an Access
limitation? Is there a way around this?
Marcus
****** 2 3052
There is no such limitation. You can use any and all
aggregation functions in one query. Could you post the
query? Could you be querying two or more tables with an
incomplete join?
Kevin Marcus<to*******@yahoo.ca> 4/12/2005 6:23:39 AM >>>
I have noticed something odd on one of my queries. Maybe someone can help or explain.
I am using the GroupBy function on all my rows except for pulling "Min" StartDate, "Max" EndDate, and "Min" StartTime and "Max" StartTime.
Problem is though, when I also pull "Count" on the Enrolment column, in the same query, I notice the Enrolment count is double or triple what it is suppose to be. It looks like I can use either Min/Max, or Count, but not both in the same query. Is this an SQL rule, or an Access limitation? Is there a way around this?
Marcus ******
Luckily enough I was able to solve the problem. I simply created two
queries: one query with the enrolment column (using an aggregate
"count"), which excluded the date/time table; and the other query
pulling the start date, end date, and start time, and end time (using
the "Min" and "Max" aggregates), excluding the enrolment column.
I then created a third query which joined the first two queries via a
section_id column. I then extracted the date,time, and enrolment
columns in the new query.
All worked out well.
Marcus
********* This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Nicolae Fieraru |
last post by:
Hi All,
I have a query, Select Count(BoolField) from tblMyTable, Where BoolField =
true.
If I run the query by itself, it returns the number of true records
I want to use the result of that...
|
by: Access Newbie |
last post by:
I'm using Access 2000 and I'm trying to create a pass-through query to
append all the data from a local table to a remote table.
I'm using the SQL query editor in MS Access to create the query (I...
|
by: elie chucrallah |
last post by:
Dear Sirs,
I have the following select query and i need to update the field
EmailLastReceivedDate (showing null in the select) to the values in the
field MaxOfSentOn using access 2000 query
...
|
by: briansmccabe |
last post by:
Does anyone have a good approach to displaying in PHP a simple COUNT
query that is performed on a table in a MySQL db?
Thanks
|
by: dBNovice |
last post by:
Hey group,
I am trying to do a count of the number of papers in a table. The
table has a PaperID that differentiates each paper , e.g. 004.1. Some
papers are reused. The reused paper is given...
| |
by: Peter Herath |
last post by:
I want to create a dynamic report using a crosstab query...... pls someone look into my attached example database and help me out to do the report generation....
example is like dis...:
there...
|
by: prabhas |
last post by:
I want to swap two tuples in a table, using a single , simple query.
No SELECT query allowed, no inner queries allowed.
No PL/SQL allowed.
Do you have any idea how to do this?
e.g. my current...
|
by: WyvsEyeView |
last post by:
This seems like it should be so easy to do. I have a table, called tblTopics. Each topic can have one or more instances, contained in a table called tblTopicInst. tblTopics is bound to a form called...
|
by: shoaib kahn |
last post by:
i am developing a web site in Asp.Net using Visual Studio 2008.
i want to know that how can i search a keyword that will be entered by the user, i want the key word should be searched in complete...
|
by: omar999 |
last post by:
hi guys
im a little stuck - how would I join this query select *,isnull(price_band_1,0)+isnull(price_band_2,0)+isnull(price_band_3,0)+isnull(price_band_4,0)+isnull(price_band_5,0) as pricesum ...
|
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,...
| |
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...
|
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...
|
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: 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,...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| | |