[AccessD] Painted into a corner...ORDER BY Solved

John Clark John.Clark at niagaracounty.com
Thu Mar 13 08:31:01 CST 2003


I no sooner sent this out, and I got a brainstorm (Ow! My head hurts,
now. Must rest). I changed the Union query's SQL from:

SELECT Findings, Count
FROM qryFindingsCntByPeriod 
UNION SELECT txtResultSpec, Count
FROM qryCountsOne
UNION SELECT txtResult, Count
FROM qryCountsTwo;

Into:

SELECT Findings, Count, "3" AS tag
FROM qryFindingsCntByPeriod 
UNION SELECT txtResultSpec, Count, "1" AS tag
FROM qryCountsOne
UNION SELECT txtResult, Count, "2" AS tag
FROM qryCountsTwo
ORDER BY tag;


This allowed me to dictate the order in the query, and thusly in the
report. I actually have about the same result that I had a couple of
days ago, but it is down to one query and a single report (i.e. no
sub-reports).

John W Clark



More information about the AccessD mailing list