其实判断也不复杂where case len(@s)when 15 then '19'+substring(@s,7,2) when 18 then substring(@s,7,4) end >=1975
where typeid in (‘02’,’07’) and contract_paymentratio =' 0.5' and case len(IDCard) when 15 then '19'+substring(IDCard,7,2) when 18 then substring(IDCard,7,4) end >=1975
SELECT name from 表A where typeid in('02','07') and contract_paymentratio ='0.5' and substring(IDCard,7,4)>='1975'注意,标点符号要用半角的.
where case len(@s)when 15 then '19'+substring(@s,7,2) when 18 then substring(@s,7,4) end >=1975
case len(@s)when 15 then '19'+substring(@s,7,2) when 18 then substring(@s,7,4) end >=1975
typeid in (‘02’,’07’)
and
contract_paymentratio =' 0.5'
and
case len(IDCard) when 15 then '19'+substring(IDCard,7,2) when 18 then substring(IDCard,7,4) end >=1975
where typeid in('02','07') and contract_paymentratio ='0.5' and substring(IDCard,7,4)>='1975'注意,标点符号要用半角的.
case len(@s)when 15 then '19'+substring(@s,7,2) when 18 then substring(@s,7,4) end >=1975