DAO:
package com.gxjs.DAO;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import util.DBException;
import util.DataBaseDAO;
import com.gxjs.model.CheckMonM;
public class CheckMonDAO {
public ArrayList getCheckMon(String beginDay,String endDay, DataBaseDAO dataBaseDAO) throws DBException{
ArrayList arrayList= new ArrayList();
CheckMonM checkMonM;
//建立结果集
ResultSet rs=null;
String strSql="select a.raw_file_name,a.record_count record_count1,a.record_normal record_normal1,b.record_count record_count2,b.record_normal record_normal2,c.record_count record_normal3,c.deal_time from log_analyse_sum a, log_billing_sum b, log_sum c ";
strSql=strSql + " where c.deal_time between TO_CHAR(TO_DATE('"+beginDay+"', 'YYYY-MM-DD'), 'YYYYMMDD') AND";
strSql=strSql + " TO_CHAR(TO_DATE('"+endDay+"', 'YYYY-MM-DD'), 'YYYYMMDD') and rownum<100 ";
System.out.println(strSql);
//取得结果集
rs=dataBaseDAO.executeQuery(strSql);
try {
while(rs.next()){
checkMonM=new CheckMonM();
checkMonM.setRawfileName(rs.getString("raw_file_name"));
checkMonM.setRecordCount1(rs.getLong("record_count1"));
checkMonM.setRecordNormal1(rs.getLong("record_normal1"));
insert into [ScholarshipManagement].[dbo].[department] ([department],[specialization] ,[grade]) output inserted.departmentID values(? ,? ,? )
请问大哥们这个sql 语句应该用Java里的那个数据库操作方法? ......