QoQ UNION distincts
What I am trying to do is UNION 2 result sets and only get the distinct values (obviously). The query being ran is:
<cfquery name="qryUseUnits" dbtype="query">
SELECT OptionDesc,
OptionValue
FROM qryUseUnits
UNION
SELECT Unit AS OptionDesc,
Unit AS OptionValue
FROM qMatSup
ORDER BY OptionDesc
</cfquery>
In the qryUseUnits table, one of the OptionDesc results is "Cubic Feet" where as for qMatSup, the value is "Cubic feet" (notice the difference in case). So when I dump the results of that query, I will get:
Cubic Feet
Cubic feet
Cubic Meters
...
The collation on the SQL Server is SQL_Latin1_General_CP1_CI_AS, and if I were to run this query directly on the server, I get distinct results for sure. However, with the case being different, CF doesn't seem to consider that distinct. Rather than change my SELECT statements to convert all column to upper- or lower-case, is there something different I can do with the query itself to get distinct values regardless of case?
