sql语句在mysql中可以查到数据,但在代码中查询不到数据???
代码:StringselectSql="selectpersonInfo.fd_idpersonInfoId,personInfo.fd_staff_nofdStaffN...
代码:
String selectSql = "select personInfo.fd_id personInfoId,personInfo.fd_staff_no fdStaffNo,welfare.fd_id welfareId " +
"from hr_staff_person_info personInfo " +
"left join hr_staff_emolument_welfare welfare " +
"on personInfo.fd_id = welfare.fd_person_info_id " +
"where personInfo.fd_id not in (select fd_id from rqss_salary_main)";
List<Object[]> list = session.createSQLQuery(selectSql).list(); 展开
String selectSql = "select personInfo.fd_id personInfoId,personInfo.fd_staff_no fdStaffNo,welfare.fd_id welfareId " +
"from hr_staff_person_info personInfo " +
"left join hr_staff_emolument_welfare welfare " +
"on personInfo.fd_id = welfare.fd_person_info_id " +
"where personInfo.fd_id not in (select fd_id from rqss_salary_main)";
List<Object[]> list = session.createSQLQuery(selectSql).list(); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询