public void preAssignedCoupon() {
        String querySELECTMSISDN = "select coupon_id from definingpreassigned_coupons";
        String querySELECTSISDN1 = "select deviceid,dreg_date from device order by dreg_date";



        log.info(querySELECTMSISDN);
        log.info(querySELECTSISDN1);
        try {

            m_Connection = getDbConnection().getConnection();
            m_Statement = m_Connection.createStatement();
            m_ResultSet = m_Statement.executeQuery(querySELECTMSISDN);

            System.err.println("Query1 execution Successfully....");
            System.err.println("Query2 execution Successfully....");
            List<String> list1 = new ArrayList<String>();
            List<Long> list2 = new ArrayList<Long>();
            List<String> list3 = new ArrayList<String>();

            while (m_ResultSet.next()) {
                list1.add(m_ResultSet.getString(1));

            }

            Statement m_Statement1 = m_Connection.createStatement();
            ResultSet m_ResultSet1 = m_Statement.executeQuery(querySELECTSISDN1);
            log.info("List1 size " + list1.size());
            while (m_ResultSet1.next()) {
                list2.add(m_ResultSet1.getLong(1));
                list3.add(m_ResultSet1.getString(2));

            }
            log.info("List2 size " + list2.size());
            log.info("List3 size " + list3.size());
            int i = 0;
            int j = list1.size();

            String DATE_FORMAT = "yyyy-MM-dd hh:mm:ss";
            SimpleDateFormat sdf =
                    new SimpleDateFormat(DATE_FORMAT);
            Calendar c1 = Calendar.getInstance(); // today
            //    log.info("Today is " + sdf.format(c1.getTime()));

            //  String queryINSERTMSISDN = "insert into assign_coupon values('" + list1.get(i) + "','" + list2.get(i) + "','" + list3.size() + "'," + sdf.format(c1.getTime()) + ")";

            while (j > 0) {
                String queryINSERTMSISDN = "insert into assign_coupon_device values('" + list1.get(i) + "','" + list2.get(i) + "','" + list3.get(i) + "','" + sdf.format(c1.getTime()) + "')";
                log.info(queryINSERTMSISDN);
                m_Statement.executeUpdate(queryINSERTMSISDN);
                i++;
                j--;
            }

            String queryINSERTMSISDN1 = "update definingpreassigned_coupons set STATUS_COUPON=" + 1;

//int l=m_Statement.executeUpdate(queryINSERTMSISDN1);
            log.info("Number of rows updated " + 1);
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (m_ResultSet != null) {
                    m_ResultSet.close();
                }
                if (m_Statement != null) {
                    m_Statement.close();
                }
                if (m_Connection != null) {
                    m_Connection.close();
                }
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
        }

    }