_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › 譯朱朱7覯讌語襴襦磯濠規蠍
|
|
Describe 譯朱朱7覯讌語襴襦磯濠規蠍 here
CASE
WHEN RIGHT(BirthDT7,1) IN ('9','0') THEN '18' + LEFT(BirthDT7, 6)
ENDWHEN RIGHT(BirthDT7,1) IN ('1','2') THEN '19' + LEFT(BirthDT7, 6) WHEN RIGHT(BirthDT7,1) IN ('3','4') THEN '20' + LEFT(BirthDT7, 6) WHEN RIGHT(BirthDT7,1) IN ('5','6') THEN '19' + LEFT(BirthDT7, 6) WHEN RIGHT(BirthDT7,1) IN ('7','8') THEN '20' + LEFT(BirthDT7, 6) declare @birth7 char(7)
set @birth7 = '7611181' select
datediff(yy, left(birthdt,8), getdate()-1)
+ case when right(birthdt, 4) > right(convert(char(8), getdate()-1, 112), 4) then -1 else 0 end age, gender from (
select
) t
case when right(@birth7,1) % 2 = 1 then '' else '' end gender
, case
when right(@birth7,1) in (3,4,7,8) then '20' + left(@birth7,6)
end birthdtwhen right(@birth7,1) in (1,2,5,6) then '19' + left(@birth7,6) when right(@birth7,1) in (9,0) then '18' + left(@birth7,6)
鏤
|
語 襦 襦 蟆 襴 襦螳 . 襦 蠍語 螻 るГ蠍磯 螻 襦 襷るジ 蠍語 譬蠍磯 覩碁 螳. (螳 豺讀襯 蟆殊蟾? 譴) |