public static void insertAllLocationTypes(){
		boolean[][] activityTypes = new boolean[numLocations+1][9];
		try {
			Connection con = dbConnect();
			PreparedStatement getActivity = con.prepareStatement(
					"SELECT COUNT(*) FROM "+actTbl+" WHERE locationID = ? AND purpose = ?");
			for (int location=1; location <= numLocations; location++){
				for (int type=0; type < 9; type++){
					getActivity.setInt(1, location);
					getActivity.setInt(2, type);
					ResultSet activityQ = getActivity.executeQuery();
					activityQ.first();
					int numMatches = activityQ.getInt(1);
					if (numMatches > 0) activityTypes[location][type] = true;
					else activityTypes[location][type] = false;
				}
			}
			PreparedStatement setType = con.prepareStatement(
					"UPDATE "+locTbl+" SET type = ? WHERE locationID = ?");
			for (int location=1; location <= numLocations; location++){
				setType.setInt(2, location);
				String typeValue = "'";
				for (int type=0; type < 9; type++){
					if (activityTypes[location][type])
						typeValue += activityTypeNames[type] + ",";
				}
				if (typeValue.length() > 1) {
					typeValue = typeValue.substring(0, typeValue.length()-1) + "'";
					setType.setString(1, typeValue);
					System.out.println(location+"\t"+typeValue);
					Statement st = con.createStatement();
					st.executeUpdate(
							"UPDATE "+locTbl+" SET type="+typeValue+" WHERE locationID="+location);
				}
				//else typeValue = "''";
			}
			setType.executeBatch();
			con.close();
		} catch (Exception e){
			System.out.println(e);
		}
	}