尝试:
select TID, TName, EffectiveDate, depre(sign(EffectiveDate - (select max(T2.EffectiveDate) from MyTable T2 where T1.Tname=T2.Tname and T2.EffectiveDate <= sysdate)), -1,'Invalid', 0,'Valid', 'Inactive') Statusfrom MyTable T1
欢迎分享,转载请注明来源:内存溢出
尝试:
select TID, TName, EffectiveDate, depre(sign(EffectiveDate - (select max(T2.EffectiveDate) from MyTable T2 where T1.Tname=T2.Tname and T2.EffectiveDate <= sysdate)), -1,'Invalid', 0,'Valid', 'Inactive') Statusfrom MyTable T1
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)