身份证号有15位和18位的..在sql中该如何判断?
I_sex = CASE when case when len(s_sfzhm)=15 then Substring(s_sfzhm,15,1) else Substring(s_sfzhm,17,1) END %2 = 1 then '男' else '女' END