MSSQL的SQL如下:
select *from ecn a inner join rules b on left(a.ecnnum,2)=b.class1 and (a.父阶 like '%'+b.class2+'%' or a.阶别 like '%'+b.class3+'%')