Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1179368
  • 博文数量: 252
  • 博客积分: 5421
  • 博客等级: 大校
  • 技术积分: 2418
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-17 12:59
文章分类

全部博文(252)

文章存档

2017年(3)

2016年(18)

2015年(31)

2014年(18)

2013年(7)

2012年(8)

2011年(12)

2010年(30)

2009年(32)

2008年(57)

2007年(36)

分类: 数据库开发技术

2007-07-24 09:27:46

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

阅读(4191) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~