日期:2014-05-17 浏览次数:20861 次
sql = "select sms_mt_send_detail"+day+" detail inner join .... where detail.user_mobile = ? and ...."
sql = "select detail.create_time,detail.send_time,detail.user_mobile,sms.message_content,detail.sender_biz_code,detail.errorcode,detail.ismg_status,detail.rpt_time from ? detail "
+" inner join sms_mt_send sms on detail.mt_send_id = sms.mt_send_id "
+" where detail.user_mobile = ? and to_char(detail.create_time,'yyyy-mm-dd')=? order by detail.mt_send_detail_id desc";
System.out.println(sql);
stmt=con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
stmt.setString(1, tableName);
stmt.setString(2, user_mobile);
stmt.setString(3, toDate);
from ? detail