【delphi源码】sql语句实现根据字段中不同的值显示不同结果【delphi源码】sql语句实现根据字段中不同的值显示不同结果

习题答案
考试通关必备网站

【delphi源码】sql语句实现根据字段中不同的值显示不同结果

UserSession.show2.Close;
UserSession.show2.SQL.Clear;
UserSession.show2.SQL.Add('select noticestu.id as 流水号 ,class.grade as 年级 ,class.[班|专业] as 班|专业 ,');
UserSession.show2.SQL.Add('(case when 类型=0 then ''全校学生通知/作业'' when 类型=1 then ''班内学生通知/作业'' else ''教师通知'' END )as 类型 ');
UserSession.show2.SQL.Add(',标题,发布人,发布时间,结束时间,开始时间,附件名 from noticestu,class where noticestu.classid=class.id');
if iwcombobox3.ItemIndex>0 then
UserSession.show2.SQL.Add('and 类型='+inttostr(iwcombobox3.ItemIndex));
未经允许不得转载:亿券答案网 » 【delphi源码】sql语句实现根据字段中不同的值显示不同结果

我来解答

匿名发表
  • 验证码: