CSN wrote:
I'm trying to get this query to work: update sectors set companies =(select companies from industries where sector_id =sectors.id);
Try these instead: update sectors set companies = industries.companies from industries where industries.sector_id =sectors.id; update industries set companies = count(companies.id) from companies where industry_id = industries.id; -- Alban Hertroys ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings