展开全部
这个~~这个~~我只写了个查询e5a48de588b662616964757a686964616f31333234333361数据库数据生产EXCEL表的程序:
%>
} else {
Connection conn = DBConnector.getconecttion(); //得到一个数据连接
try {
String type = request.getParameter("type");
if(type==null)type="a";
String dwyhzh = (String) session.getAttribute("dwyhzh");
dwcx dwcx1 = new dwcx();
//int k = dwcx1.zgzs(conn, dwyhzh);
String sql="SELECT * FROM v_168_info WHERE dwyhzh = '" + dwyhzh + "' and zhzt!=2 ORDER BY zgyhzh asc";
if(type.equals("b")){
sql= "SELECT * FROM v_168_info WHERE dwyhzh = '" + dwyhzh + "' and zhzt!=2 and len(sfzhm)<1 ORDER BY zgyhzh asc";
}
if(type.equals("c")){
sql= "SELECT * FROM v_168_info WHERE dwyhzh = '" + dwyhzh + "' and zhzt!=2 and len(gjjkh)<1 ORDER BY zgyhzh asc";
}
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);
// java.text.DecimalFormat dff = new