做研究生创新能力课题的一些转换代码

/****** Script for SelectTopNRows command from SSMS  ******/
SELECT TOP 1000 [学校]
      ,[年级]
      ,[性别]
      ,[1#_请问您在校期间有发表过学术论文吗?请选择已发表的最高级别:]
      ,[2#_请问您在校期间参加过科研项目吗?请选择已参加的最高级别:]
      ,[3#_请问您在校期间参加学术会议吗?请选择已参加的最高级别:]
      ,[4#_请问您在校期间参加创新比赛项目吗?请选择已参加的最高级别:]
      ,[5#_请问您在校期间有获得或申请过专利凭证吗?请选择对应的次数:]
      ,[6、请问您大学本科时各科成绩平均分大致在以下哪个范围内?]
      ,[7、请问您读研期间各科成绩的平均分大致在在以下哪个范围内? ]
      ,[1#_经常可以从其他领域发现自己专业领域的创新灵感]
      ,[2#_我善于发现生活中的新变化、新问题]
      ,[3#_能主动发现一些问题,并发现和问题有关的各种联系]
      ,[4#_在思考与解决问题时,我的思路总是清晰的、畅通的,头脑中经常涌现出心的想法]
      ,[5#_我善于发现问题的未知部分,通常能预测问题结果,并能正确地验证这一结果]
      ,[6#_学习中我能够比别人想得更深一层]
      ,[7#_我敢于大胆设想新的工作方案]
      ,[8#_通常遇到问题时,我常能从多方面进行思考、探索可能性,而不是固定在一种思路或局限在某一方面]
      ,[9#_遇到挫折时我能很快从中恢复过来并继续前进]
      ,[10#_遇到问题时我能够迎难而上]
      ,[11#_我做事非常严谨、认真,并对问题进行深思熟虑、精益求精]
      ,[12#_我能够对权威提出疑问即使有些已有定论]
      ,[13#_我宁愿和大家一起努力工作,而不愿意单独工作]
      ,[14#_我经常参加集体活动或项目]
      ,[15#_我经常与别人探讨学术,交流思想]
      ,[1、我们学校的学习氛围很浓厚—]
      ,[0~1]
      ,[1~2]
      ,[2~3]
      ,[3~4]
      ,[4~5]
      ,[2、我能很好的运用多学科知识来解决问题]
      ,[0~11]
      ,[1~21]
      ,[2~31]
      ,[3~41]
      ,[4~51]
      ,[3、我能很快的收集到我需要的信息并有效处理—]
      ,[0~12]
      ,[1~22]
      ,[2~32]
      ,[3~42]
      ,[4~52]
      ,[4、我经常关注相关学科或学术前沿问题—]
      ,[0~13]
      ,[1~23]
      ,[2~33]
      ,[3~43]
      ,[4~53]
      ,[5、在解决问题时,我分析问题较快,而具体实施较慢  —]
      ,[0~14]
      ,[1~24]
      ,[2~34]
      ,[3~44]
      ,[4~54]
      ,[6、创新的想法经常有,但真正动手去做的却很少—]
      ,[0~15]
      ,[1~25]
      ,[2~35]
      ,[3~45]
      ,[4~55]
      ,[7、当我动手去做的时候我总能做的很好—]
      ,[0~16]
      ,[1~26]
      ,[2~36]
      ,[3~46]
      ,[4~56]
      ,[您对提升研究生创新能力有何建议?(选答)]
      ,[总分]
      ,[F76]
      ,[F77]
      ,[F78]
      ,[F79]
      ,[F80]
      ,[F81]
      ,[F82]
      ,[F83]
      ,[F84]
      ,[F85]
  FROM [innovation].[dbo].[graduates]
use innovation
update graduates set 学校='南昌大学' where 学校='1'
update graduates set 学校='江西财经大学' where 学校='2'
update graduates set 学校='江西师范大学' where 学校='3'
update graduates set 学校='南昌航空大学' where 学校='4'
update graduates set 学校='江西农业大学' where 学校='5'
update graduates set 学校='华东交通大学' where 学校='6'

update graduates set 年级='研一' where 年级='1'
update graduates set 年级='研二' where 年级='2'
update graduates set 年级='研三' where 年级='3'
select * from dbo.graduates
update graduates set 性别='男' where 性别='1'
update graduates set 性别='女' where 性别='2'
delete from graduates where 年级 is null
select COUNT(*) as '南昌大学研一人数' from graduates where 学校='南昌大学' and 年级='研一' 
select COUNT(*) as '南昌大学研二人数' from graduates where 学校='南昌大学' and 年级='研二' 
select COUNT(*) as '南昌大学研三人数' from graduates where 学校='南昌大学' and 年级='研三' 
/* 下面开始将问卷数据转换成点值*/

/****** Script for SelectTopNRows command from SSMS  ******/
SELECT TOP 1000 [学校]
      ,[年级]
      ,[性别]
      ,[Q1]
      ,[Q2]
      ,[Q3]
      ,[Q4]
      ,[Q5]
      ,[Q6]
      ,[Q7]
      ,[Q8]
      ,[Q9]
      ,[Q10]
      ,[Q11]
      ,[Q12]
      ,[Q13]
      ,[Q14]
      ,[Q15]
      ,[Q16]
      ,[Q17]
      ,[Q18]
      ,[Q19]
      ,[Q20]
      ,[Q21]
      ,[Q22]
      ,[Q23]
      ,[0~1]
      ,[1~2]
      ,[2~3]
      ,[3~4]
      ,[4~5]
      ,[Q24]
      ,[0~11]
      ,[1~21]
      ,[2~31]
      ,[3~41]
      ,[4~51]
      ,[Q25]
      ,[0~12]
      ,[1~22]
      ,[2~32]
      ,[3~42]
      ,[4~52]
      ,[Q26]
      ,[0~13]
      ,[1~23]
      ,[2~33]
      ,[3~43]
      ,[4~53]
      ,[Q27]
      ,[0~14]
      ,[1~24]
      ,[2~34]
      ,[3~44]
      ,[4~54]
      ,[Q28]
      ,[0~15]
      ,[1~25]
      ,[2~35]
      ,[3~45]
      ,[4~55]
      ,[Q29]
      ,[0~16]
      ,[1~26]
      ,[2~36]
      ,[3~46]
      ,[4~56]
      ,[您对提升研究生创新能力有何建议?(选答)]
      ,[总分]
  FROM [innovation].[dbo].[graduates]
  /*
select COUNT(*) as '南昌大学研一人数' from graduates where 学校='南昌大学' and 年级='研一' 
select COUNT(*) as '南昌大学研二人数' from graduates where 学校='南昌大学' and 年级='研二' 
select COUNT(*) as '南昌大学研三人数' from graduates where 学校='南昌大学' and 年级='研三' 
*/
select * from graduates
select COUNT(*) from graduates where 学校='南昌大学'
select COUNT(*) from graduates where 学校='江西财经大学'
select COUNT(*) from graduates where 学校='江西师范大学'
select COUNT(*) from graduates where 学校='南昌航空大学'
select COUNT(*) from graduates where 学校='江西农业大学'
select COUNT(*) from graduates where 学校='华东交通大学'
/***********

下面开始成绩转换
***********************/
/*1. 请问您在校期间有发表过学术论文吗?请选择已发表的最高级别: [单选题]
○ C刊以上	○ C刊	○ 核心期刊	○ 核心以下	
选1 得5分,选2得3分,选3得2分 选4得1分
*/
update graduates set Q1='5' where Q1='1'
update graduates set Q1='3' where Q1='2'
update graduates set Q1='2' where Q1='3'
update graduates set Q1='1' where Q1='4'
update graduates set Q1='1' where Q1='-2'---2的赋值为1分
/*2. 请问您在校期间参加过科研项目吗?请选择已参加的最高级别: [单选题]
○ 国际级	○ 国家级	○ 省级	○ 省级以下或无	
选1 得5分,选2得3分,选3得2分 选4得1分

*/

update graduates set Q2='5' where Q2='1'
update graduates set Q2='3' where Q2='2'
update graduates set Q2='2' where Q2='3'
update graduates set Q2='1' where Q2='4'
update graduates set Q2='1' where Q2='-2'---2的赋值为1分
/*
3. 请问您在校期间参加学术会议吗?请选择已参加的最高级别: [单选题]
○ 国际级	○ 国家级	○ 省级	○ 省级以下或无	
选1 得5分,选2得3分,选3得2分 选4得1分

*/
select * from graduates
update graduates set Q3='5' where Q3='1'
update graduates set Q3='3' where Q3='2'
update graduates set Q3='2' where Q3='3'
update graduates set Q3='1' where Q3='4'
update graduates set Q3='1' where Q3='-2'---2的赋值为1分
/*
4. 请问您在校期间参加创新比赛项目吗?请选择已参加的最高级别: [单选题]
○ 国际级	○ 国家级	○ 省级	○ 省级以下或无	

选1 得5分,选2得3分,选3得2分 选4得1分
*/
select * from graduates
update graduates set Q4='5' where Q4='1'
update graduates set Q4='3' where Q4='2'
update graduates set Q4='2' where Q4='3'
update graduates set Q4='1' where Q4='4'
update graduates set Q4='1' where Q4='-2'---2的赋值为1分
/*
5. 请问您在校期间有获得或申请过专利凭证吗?请选择对应的次数: [单选题]
○ 0	○ 1	○ 2	○ 3及以上	

选1得1分,选2得2分,选3得3分,选4得5分
*/
select * from graduates
update graduates set Q5='5' where Q5='4'
update graduates set Q5='3' where Q5='4'
update graduates set Q5='2' where Q5='2'
update graduates set Q5='1' where Q5='1'
update graduates set Q5='1' where Q5='-2'---2的赋值为1分
/*6、请问您大学本科时各科成绩平均分大致在以下哪个范围内? [单选题]
○ 100~90	○ 90~80	○ 80~70	○ 70~0	
选1 得5分,选2得3分,选3得2分 选4得1分

*/
select * from graduates
update graduates set Q6='5' where Q6='1'
update graduates set Q6='3' where Q6='2'
update graduates set Q6='2' where Q6='3'
update graduates set Q6='1' where Q6='4'
update graduates set Q6='1' where Q6='-2'---2的赋值为1分
/*
7、请问您读研期间各科成绩的平均分大致在在以下哪个范围内? [单选题]
○ 100~90	○ 90~80	○ 80~70	○ 70~0	
选1 得5分,选2得3分,选3得2分 选4得1分

*/
select * from graduates
update graduates set Q7='5' where Q7='1'
update graduates set Q7='3' where Q7='2'
update graduates set Q7='2' where Q7='3'
update graduates set Q6='1' where Q6='4'
update graduates set Q7='1' where Q7='-2'---2的赋值为1分
/*
8. 经常可以从其他领域发现自己专业领域的创新灵感 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


9. 我善于发现生活中的新变化、新问题 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


10. 能主动发现一些问题,并发现和问题有关的各种联系 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


11. 在思考与解决问题时,我的思路总是清晰的、畅通的,头脑中经常涌现出心的想法 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


12. 我善于发现问题的未知部分,通常能预测问题结果,并能正确地验证这一结果 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


13. 学习中我能够比别人想得更深一层 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


14. 我敢于大胆设想新的工作方案 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


15. 通常遇到问题时,我常能从多方面进行思考、探索可能性,而不是固定在一种思路或局限在某一方面 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


16. 遇到挫折时我能很快从中恢复过来并继续前进 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


17. 遇到问题时我能够迎难而上 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


18. 我做事非常严谨、认真,并对问题进行深思熟虑、精益求精 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


19. 我能够对权威提出疑问即使有些已有定论 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


20. 我宁愿和大家一起努力工作,而不愿意单独工作 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


21. 我经常参加集体活动或项目 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	


22. 我经常与别人探讨学术,交流思想 [单选题]
非常不符合  ○ 非常不符合	○ 2	○ 3	○ 4	○ 非常符合  非常符合	




*/
--Q8--Q22为量表题,无须转换且均为正向2016年4月6日 13:51:15

select * from graduates where Q10<0
select * from graduates
update graduates set Q10='3' where Q10='-2'---2的赋值为3分
select * from graduates where Q15<0
update graduates set Q15='3' where Q15='-2'---2的赋值为3分
select * from graduates where Q16<0
update graduates set Q16='3' where Q16='-2'---2的赋值为3分
select * from graduates where Q19<0
update graduates set Q19='3' where Q19='-2'---2的赋值为3分
select * from graduates where Q21<0
update graduates set Q21='3' where Q21='-2'---2的赋值为3分
select * from graduates where Q22<0
update graduates set Q22='3' where Q22='-2'---2的赋值为3分
select * from graduates

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值