Foxtable(狐表)用户栏目专家坐堂 → 这个语句在数据库中执行是正确的,确定时出错


  共有2870人关注过本帖树形打印复制链接

主题:这个语句在数据库中执行是正确的,确定时出错

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109704 积分:558224 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/11/12 13:40:00 [显示全部帖子]

把列名的双引号全部去掉,"cregno" 改为cregno

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109704 积分:558224 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/11/12 14:25:00 [显示全部帖子]

cmd.CommandText="S ELECT   a.cregno,(Case left(a.cregno,1) when 'S' then '非住客' else (s elect cguestname from ft_his_xs_reg_1 where cregno = a.cregno) end)  as cguestname,(Case left(a.cregno,1) when 'S' then '非住客' when 'T' then '团体' else (s elect cguesttype from ft_his_xs_reg_1 where cregno = a.cregno) end) as cguesttype, ....

 回到顶部