select rtrim(a.stuid), left(a.studentLevel,4) as stulevelYear,
right(rtrim(a.studentLevel),2) as stulevelMonth, left(a.applyYear,4) as graduateYear,right(rtrim(a.applyYear),2) as graduateYearMonth,
case when a.studentLevel<=200503 then '网络教育学院' else '继续教育学院'end college,
replace(a.subject,'(跨专业)','') as subject, case rtrim(a.studykind) when '高中起点本科' then '五' else '三' end learningYear,
case rtrim(a.studykind) when '高中起点专科' then '专' when '高中起点本科' then '本' end PYstudykind,
case rtrim(applyType) when 2 then '毕业' when 3 then '结业' when 4 then '肄业' else '有错' end applyType,
isnull(r.birthday,(select isnull(convert(varchar(10),q.Birthday,120),
cast(isnull(q.birthyear,'0000') as varchar(4))+'-'+cast(isnull(q.birthmonth,'00')
as varchar(2))+'-'+cast(isnull(q.birth_day,'00') as varchar(2)))
from stusignsys q where q.archieveid=r.archieveid))
from biyesys..T_graduate_stuinfo a
inner join stusys..registerdetail r on a.studentid = r.userid
阅读(4340) | 评论(1) | 转发(0) |