public int checkExpectedResults(String sql) throws SQLException {
		Statement stmt = null;
		ResultSet rs = null;
		
		try {
			
			if (connection == null) {
				connection = getConnection();
			}
			
			stmt = connection.createStatement();			
			
			log.info("Running: " + sql);
			
			long startTime = System.currentTimeMillis();
			
			rs = stmt.executeQuery(sql);
			
			log.info("Executed time: " + ((System.currentTimeMillis()-startTime)/1000f) + " seconds");
			
			while (rs.next()) {
				int retVal = rs.getInt(1);
				log.info("Returned value is " + retVal);
				return retVal;
			}		
			
			return 0;
			
		} finally {
			close(rs,stmt);
		}

	}