public boolean updateOneSymbol(Investment oneInvestment) {
		boolean flag = false;
		int type = getInvestType(oneInvestment.getSymbol());
		String typeTable;
		
		if (type == 0) {
			typeTable = "stock";
		} else {
			typeTable = "mutual_fund";
		}
		
		Timestamp stamp = getLatestTimestamp(oneInvestment.getSymbol(), typeTable);
		if (stamp != null) {// if existed, update it
//update stock set time = TO_TIMESTAMP('2014-04-01 22:05:00.0', 'YYYY-MM-DD HH24:MI:SS.FF'), price = 32.33 where tiker_symbol = 'AAN'
			if (stamp.before(oneInvestment.getTimestamp())) {
				String query = "update " + typeTable + " set time = TO_TIMESTAMP('" + oneInvestment.getTimestamp().toString() + "', 'YYYY-MM-DD HH24:MI:SS.FF'), " +
						"price = '" + oneInvestment.getPrice() + "' where symbol = '" + oneInvestment.getSymbol() + "'";
				
				Statement s;
				try {
					s = con.createStatement();
					
					ResultSet result;
					
					result = s.executeQuery(query);		
					if (result.next()) {
						flag = true;
					}
					
					s.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
			} else {
				flag = true; // the input is in fact older...
			}
		} else {
//insert into mutual_fund values('AABNX', TO_TIMESTAMP('2014-04-01 22:05:00.0', 'YYYY-MM-DD HH24:MI:SS.FF'), 12.50)
			String query1 = "insert into investment values ('" + oneInvestment.getSymbol() + "', '" + type + "')";
			String query2 = "insert into " + typeTable + " values('" + oneInvestment.getSymbol() + "', TO_TIMESTAMP('" + oneInvestment.getTimestamp().toString() +
								"', 'YYYY-MM-DD HH24:MI:SS.FF'), '" + oneInvestment.getPrice() + "')";
			Statement s;
			try {
				con.setAutoCommit(false);
				s = con.createStatement();
				
				int result1, result2;
				result1 = s.executeUpdate(query1);
				result2 = s.executeUpdate(query2);
				
				if (result1 > 0 && result2 > 0) {
					flag = true;
				}			
				
				s.close();
				con.commit();
				con.setAutoCommit(true);
			} catch (SQLException e) {
				try {
					con.rollback();
					con.setAutoCommit(true);
				} catch (SQLException e1) {
					e1.printStackTrace();
				}
			}
		}

		return flag;
	}