public void StoreStockPriceToDB(String code, boolean clean) {
		log.info("start store price to db...");
		
		if (!code.equals(ALL_STOCK_CODE) && 
				!stock_map.containsKey(TransDetailRecord.MARKET_SH + "," + code) &&
				!stock_map.containsKey(TransDetailRecord.MARKET_SZ + "," + code)) {
			log.error("no stock price in mem! code:" + code);
			return;
		}
		
		int num = 0;
		
		for (String key : stock_map.keySet().toArray(new String[0])) {
			
			String arrs[] = key.split(",");
			String stock_market = arrs[0];
			String stock_code = arrs[1];
			
			if (code.equals(ALL_STOCK_CODE) || code.equals(stock_code)) {
				num++;
				log.info("	store " + num + ":" + stock_code);
				
				String table_name = STOCK_PRICE_TABLE_PRE + stock_market + "_" + stock_code;
				String sql = "create table if not exists " + table_name + 
						"(`date` DATE not null default '0000-00-00', " +
						"`open` double NOT NULL default '0', " +
						"`close` double NOT NULL default '0', " +
						"PRIMARY KEY (`date`)" +
						") ENGINE=MyISAM DEFAULT CHARSET=utf8";	
				
				dbInst.updateSQL(sql);
				if (clean) {
					sql = "delete from " + table_name;
					log.info("	" + sql);
					dbInst.updateSQL(sql);
				}
				
				//HashMap<String, Double> stock_price = stock_map.get(stock_code);
				TreeMap<String, PriceRecord> stock_price = new TreeMap<String, PriceRecord>(stock_map.get(key));
				for (String date : stock_price.keySet().toArray(new String[0])) {
					PriceRecord pr = stock_price.get(date);
					sql = "insert into " + table_name + "(date, open, close) values " +
							"('" + date + "', " + pr.open + "," + pr.close + ") " +
									"ON DUPLICATE KEY UPDATE open = " + pr.open + ", close = " + pr.close;
					dbInst.updateSQL(sql);
				}
			}
			
			TreeMap<String, ExDivide> ex_divide_map = ReadExDivideFromDB(stock_market, stock_code);
			UpdateStockPriceByExDivide(stock_market, stock_code, ex_divide_map);
		}
	}