|
如题 我要查询一大堆dong(东)西
String dept="select dept_name from dept; _";
String cn="select count(*) from emp where emp_dept=? and to_char(emp_joindate,'yyyy-mm')<'"+years+"-"+month+"'; _";
String ce="SELECT COUNT(*) FROM emp WHERE to_char(emp_joindate,'yyyy-mm') ='"+years+"-"+month+"' and emp_dept=?; _";
String cd="select count(*) from el where to_char(el_date,'yyyy-mm')='"+years+"-"+month+"' and emp_dept=?; _";
String cf="select count(*) from dr where to_char(dr_date,'yyyy-mm')='"+years+"-"+month+"' and dr_dept_a=?; _";//dr_depr_a是名cheng(称)
String co="select count(*) from dr where to_char(dr_date,'yyyy-mm')='"+years+"-"+month+"' and dr_dept_f=?; _";//dr_depr_a是名称
String cgs="select count(*) from emp where to_char(emp_jiondate,'yyyy-mm')='"+years+"-"+month+"' and emp_dept=? and emp_education='研究生'; _";
String cuc="select count(*) from emp where to_char(emp_jiondate,'yyyy-mm')='"+years+"-"+month+"' and emp_dept=? and emp_education='本科生'; _";
String cjc="select count(*) from emp where to_char(emp_jiondate,'yyyy-mm')='"+years+"-"+month+"' and emp_dept=? and emp_education='大专生'; _";
String cshs="select count(*) from emp where to_char(emp_jiondate,'yyyy-mm')='"+years+"-"+month+"' and emp_dept=? and emp_education='高中级yi(以)下'";
String sql=dept+cn+ce+cd+cf+co+cgs+cuc+cjc+cshs;
应该怎么连接 才能让这ge(个)包han(含)所有sql语句De(的)sqlzi(字)符串顺利执行
http://www.javaxxz.com |
|