日期:2014-05-18  浏览次数:20638 次

急。急。急。急。急。大家指点降序排列。
<%@   page   contentType= "text/html;charset=GBK "%>
<%@page   import= "java.sql.* "%>
<%@page   import= "javax.naming.* "%>
<%@page   import= "javax.sql.* "%>  
<%@page   import= "java.text.DecimalFormat "%>  
<%@page   import= "java.util.* "%>
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<meta   name= "GENERATOR "   content= "Microsoft   FrontPage   4.0 ">
<meta   name= "ProgId "   content= "FrontPage.Editor.Document ">
<STYLE   type=text/css>
.style1   {
font-size:   18px;
font-weight:   bold;
color:   #FF9933;
}
td,th,body,input,select,textarea{font-size:12px;}
</STYLE>
<SCRIPT   src= "sorttable.js "   type= "text/javascript "> </SCRIPT>
</head>
<body>
<%
Connection   conn=null;
try{
InitialContext   ctx=new   InitialContext();
DataSource   ds=null;
ds=(javax.sql.DataSource)ctx.lookup( "oradb ");
conn=ds.getConnection();
ResultSet   rs=null;
ResultSet   rs1=null;
Statement   stmt   =   conn.createStatement();
String   sql= "select   min(riqi)   riqi   from   tablename ";
String   minDate= " ";
rs=stmt.executeQuery(sql);
while(rs.next()){
    minDate=rs.getString( "riqi ");
}
if(null==minDate)minDate= " ";
String   sql1= "select   max(riqi)   riqi   from   tablename ";
String   maxDate= " ";
rs=stmt.executeQuery(sql1);
while(rs.next()){
    maxDate=rs.getString( "riqi ");
}
if(null==maxDate)maxDate= " ";
out.println( " <p   align= 'center '   class= 'style1 '> 测试 </p> ");
out.println( " <table   width=60%   border= '1 '   bordercolor= '#FFFFFF '   bordercolorlight= '#999999 '   align= 'center '   cellspacing= '0 '   cellpadding= '5 '   bgcolor= 'f4f4f4 '   class= 'sortable '   id= 'mytable '> ");
out.println( " <tr   align= 'center '> <td   rowspan= '2 '> <b> 地市 </b> </td> <td   colspan= '3 '> <b> M数 </b> </td> <td   colspan= '3 '> <b> N数 </b> </td> </tr> ");
out.println( " <tr   align= 'center '> ");
out.println( " <td> <b> A完成 </b> </td> ");
out.println( " <td> <b> 计划指标 </b> </td> ");
out.println( " <td> <b> 完成比例 </b> </td> ");
out.println( " <td> <b> B完成 </b> </td> ");
out.println( " <td> <b> 计划指标 </b> </td> ");
out.println( " <td> <b> 完成比例 </b> </td> ");
out.println( " </tr   align= 'center '> ");
tablename   where   riqi   = '20070331 '   or   riqi   = '20070430 '   or   r