Hi Walter, You may need to post a small sample of data to help us understand
this issue. how does petID crop up in the data for example.
On 10/22/06, Walter Conti [EMAIL PROTECTED] wrote:
cfquery name=getSigs datasource=firme
select signerName, signerLocation, signerComment, dateSigned,
Subject: Re: Noob MSAccess query struggle
Hi Walter, You may need to post a small sample of data to help us understand
this issue. how does petID crop up in the data for example.
On 10/22/06, Walter Conti [EMAIL PROTECTED] wrote:
cfquery name=getSigs datasource=firme
select signerName
Walter,
You are grouping by dateSigned which ensures that the min() and max() will be
the same (because you get a new record for each value of dateSigned).
Remove dateSigned from your select statement and your group by statement and
see if your results make more sense.
Steve Bryant.
Bryant
Walter Conti wrote:
cfquery name=getSigs datasource=firme
select signerName, signerLocation, signerComment, dateSigned,
MIN([dateSigned]) as startDate, MAX([dateSigned]) as endDate
from signatures
where signatures.petId ='#id#'
group by signerName, signerLocation, signerComment, dateSigned
I don't think he can remove dateSigned from the group by statement,
since you must have all non-aggregate or subquery columns in the group
by statement.
I think he needs to look at his data in the fashion that the query is
grouping it. It may be the case that the min() and max() are the same
for
I don't think he can remove dateSigned from the group by statement
He should remove it from both the select AND the group statements.
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to
6 matches
Mail list logo