但是,我构建了一个查询(见下文),而不是返回“大于 20 或 30”,我希望我的查询实际显示计数(例如 31、35、50 等)。我似乎无法弄清楚该怎么做。谢谢您的帮助。
select
cc_units_of_measure.description as UOM_Description,
case when LEN(cc_units_of_measure.description) < 20 then 'OK'
else 'Greater than 20'
end as Results_UOM_description,
cc_units_of_measure.company_abbreviation as UOM_Company_Abbreviation,
case when LEN(cc_units_of_measure.company_abbreviation) < 20 then 'OK'
else 'Greater than 20'
end as Results_UOM_company_abbreviation,
cc_frequencies.description as Freq_Description,
case when LEN(cc_frequencies.description) < 30 then 'OK'
else 'Greater than 30'
end as Results_Frequency_description
from cc_units_of_measure, cc_frequencies