rs.next()返回值总是为False,急!!!

m0_55845108 2022-01-27 10:16:33
var sql1="select trim(branch_no) as branch_no from "+
"(select coalesce(max(g.user_id), max(to_char(d.user_id))) as user_id,a.branch_no "+
"from amldata.t_process_batch_no a "+
"inner join sett.t_pub_branch bran "+
"on a.branch_no = bran.branch_no "+
"left join wolf.ks_drole_data b "+
"on a.branch_no = b.key_id "+
"and b.status = '1' "+
"left join wolf.wb_user_role c "+
"on b.drole_id = c.user_id "+
"left join wolf.wb_user d "+
"on c.user_id = d.user_id "+
"and exists(select 1 "+
"from wolf.wb_user_role e "+
"where e.user_id = d.user_id "+
"and e.role_id = 'fxqyybjs') "+
"left join amldata.t_prs_flow_user f "+
"on a.branch_no = f.branch_no "+
"left join wolf.wb_user g "+
"on f.user_name_1 = g.user_name "+
"where a.process_id = 'xMainRouteId' "+
// "and (d.status = '1' or g.status = '1')"+
"group by a.branch_no"+
" order by a.branch_no "+
")";
// "where user_id = (select user_id from wolf.wb_user where user_name = '"+user+"') ";

app.info('88888888888');
// app.log(BRANCH_NO);
var rs1 = app.run(sql1);
if(rs1.next()){
branchNo = rs1.getString("BRANCH_NO");
app.set('BRANCH_NO',branchNo);}

rs.next()返回值总是为False,但是sql语句在数据库中是可以查到数据的。

...全文
177 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
kecp_douchengzhe 2022-01-29
精选
  • 打赏
  • 举报
回复 1

为什么这样写

81,114

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧