I
Ian
Does anyone know of a bug when using crosstab queries? I
am getting different results if I add a long description
field (255 char) and group by it, as opposed to using
First or not including it, even though I am already
grouping by the key of this table.
The SQL that works is:
TRANSFORM Sum(TimeCostCalcs.Cost) AS SumOfCost
SELECT TimeCostCalcs.Project, TimeCostCalcs.JobCode
FROM TimeCostCalcs INNER JOIN tlkpJobCode
ON (TimeCostCalcs.JobCode = tlkpJobCode.JobCode)
AND (TimeCostCalcs.Project = tlkpJobCode.ParentProject)
WHERE (((TimeCostCalcs.Project)="fz2000")
AND ((TimeCostCalcs.WorkGroup) Like "sv*"))
GROUP BY TimeCostCalcs.Project, TimeCostCalcs.JobCode
PIVOT TimeCostCalcs.WorkGroup;
The SQL with far fewer results is:
TRANSFORM Sum(TimeCostCalcs.Cost) AS SumOfCost
SELECT TimeCostCalcs.Project, TimeCostCalcs.JobCode
FROM TimeCostCalcs INNER JOIN tlkpJobCode ON
(TimeCostCalcs.Project = tlkpJobCode.ParentProject) AND
(TimeCostCalcs.JobCode = tlkpJobCode.JobCode)
WHERE (((TimeCostCalcs.Project)="fz2000") AND
((TimeCostCalcs.WorkGroup) Like "sv*"))
GROUP BY TimeCostCalcs.Project, TimeCostCalcs.JobCode,
tlkpJobCode.JobCodeName
PIVOT TimeCostCalcs.WorkGroup;
The JobCodeName is 255 char. The key of the tlkpJobCode is
just Jobcode.
If anyone can tell me any more I would be grateful
Ta
am getting different results if I add a long description
field (255 char) and group by it, as opposed to using
First or not including it, even though I am already
grouping by the key of this table.
The SQL that works is:
TRANSFORM Sum(TimeCostCalcs.Cost) AS SumOfCost
SELECT TimeCostCalcs.Project, TimeCostCalcs.JobCode
FROM TimeCostCalcs INNER JOIN tlkpJobCode
ON (TimeCostCalcs.JobCode = tlkpJobCode.JobCode)
AND (TimeCostCalcs.Project = tlkpJobCode.ParentProject)
WHERE (((TimeCostCalcs.Project)="fz2000")
AND ((TimeCostCalcs.WorkGroup) Like "sv*"))
GROUP BY TimeCostCalcs.Project, TimeCostCalcs.JobCode
PIVOT TimeCostCalcs.WorkGroup;
The SQL with far fewer results is:
TRANSFORM Sum(TimeCostCalcs.Cost) AS SumOfCost
SELECT TimeCostCalcs.Project, TimeCostCalcs.JobCode
FROM TimeCostCalcs INNER JOIN tlkpJobCode ON
(TimeCostCalcs.Project = tlkpJobCode.ParentProject) AND
(TimeCostCalcs.JobCode = tlkpJobCode.JobCode)
WHERE (((TimeCostCalcs.Project)="fz2000") AND
((TimeCostCalcs.WorkGroup) Like "sv*"))
GROUP BY TimeCostCalcs.Project, TimeCostCalcs.JobCode,
tlkpJobCode.JobCodeName
PIVOT TimeCostCalcs.WorkGroup;
The JobCodeName is 255 char. The key of the tlkpJobCode is
just Jobcode.
If anyone can tell me any more I would be grateful
Ta