how would i return the values from 3 columns into one then rank the
top 5?
i suppose i would get the top 5 rows sorted DESC.
how to get
field1 + field2 + field3 values into one column?
this gives me exactly what i was looking for in Access, but doesn't
fly with ms sql:
SELECT TOP 5 [%$##@_Alias].allserotype, Count([%
$##@_Alias].allserotype) AS serocount
FROM
(SELECT specimen.serotype As allserotype
FROM specimen WHERE NOT IsNull(specimen.serotype) AND
specimen.serotype <> 'NEGATIVE' AND batchnum = 20075
UNION All
SELECT specimen.serotype2 As allserotype
FROM specimen WHERE NOT IsNull(specimen.serotype2) AND
specimen.serotype <> 'NEGATIVE' AND batchnum = 20075
UNION All
SELECT specimen.serotype3 As allserotype
FROM specimen WHERE NOT IsNull(specimen.serotype3) AND
specimen.serotype <> 'NEGATIVE' AND batchnum = 20075)
GROUP BY [%$##@_Alias].allserotype
ORDER BY Count([%$##@_Alias].allserotype) DESC;
i know this is not an ms sql group, but anybody know how to make it
work. NOTE: i know the IsNull won't work as is.