public static void updateRecords(List<IntradayRecord> records) throws ParseException, SQLException {
		if( records.isEmpty() ) return;
		
		IntradayRecord firstRecord = records.get(0);
		IntradayRecord lastRecord = records.get(records.size() - 1);
		String symbol = firstRecord.getSymbol();
		
		String deleteSQL = "delete from IntradayData where symbol = ? and date between ? and ?";
		
		StringBuilder insertSQL = new StringBuilder();
		boolean first = true;
		insertSQL.append("insert into IntradayData(symbol, date, high, low, open, close, volume) values");
		for( IntradayRecord r : records ) {
			if( !first ) {
				insertSQL.append(",");
			}
			insertSQL.append("('").append(r.getSymbol()).append("',");
			insertSQL.append("'").append(Utils.formatDateTime(r.getDate())).append("',");
			insertSQL.append(r.getHigh()).append(",");
			insertSQL.append(r.getLow()).append(",");
			insertSQL.append(r.getOpen()).append(",");
			insertSQL.append(r.getClose()).append(",");
			insertSQL.append(r.getVolume()).append(")");
			first = false;
		}
		
		Connection c = null;
		try {
			c = Utils.getConnection();
			PreparedStatement stmt = c.prepareStatement(deleteSQL.toString());
			stmt.setString(1, symbol);
			stmt.setTimestamp(2, new java.sql.Timestamp(DateUtils.add(firstRecord.getDate(), Calendar.MINUTE, -10).getTime()));
			stmt.setTimestamp(3, new java.sql.Timestamp(DateUtils.add(lastRecord.getDate(), Calendar.MINUTE, 10).getTime()));
			stmt.executeUpdate();
			
			stmt = c.prepareStatement(insertSQL.toString());
			stmt.executeUpdate();
		} finally {
			if( c != null ) {
				try { c.close(); } catch( SQLException e ) {}
			}
		}
	}