select count(*) from table where rtrim(sort1) + rtrim(sort2) ='iso9000iso14000' or rtrim(sort2) +rtrim(sort1) ='iso9000iso14000'
select count(*) as 通过9000的数目 from T1 where sort1 = 'iso9000' or sort2 = 'iso9000'select count(*) as 通过14000的数目 from T1 where sort1 = 'iso14000' or sort2 = 'iso14000'
select sum(case when sort1='iso9000' or sort2='iso9000' then 1 end) iso9000数量,sum(case when sort1='iso14000' or sort2='iso14000' then 1 end) iso14000数量 from 表
where rtrim(sort1) + rtrim(sort2) ='iso9000iso14000' or rtrim(sort2) +rtrim(sort1) ='iso9000iso14000'
iso14000 是代表 iso14000系列
而不仅仅是iso9000 和iso14000 !!!help !!!
select count(*) from T1 where sort1+sort2 like '%iso4000%'