Hello All,
I have recently discovered that I cannot UPDATE a table with the results of a conventional COUNT query. I have struggled all day to find a work around for this problem but to no avail. Outlined below is what I'm attempting to do in 'conventional' SQL.
UPDATE tableZ
SET columnA = (SELECT COUNT (*) AS columnA
FROM tableX
WHERE tableX.colB = 1 AND tableX.colC = 2);
The tables (Z and X) are not linked to any other tables and are empty (although theuy have structure). I have full read write permissions on the database and all its tables.
Would anoyone be able to offer adivce on how I could transform this UPDATE query into something Access (2003) would find acceptable?
I have recently discovered that I cannot UPDATE a table with the results of a conventional COUNT query. I have struggled all day to find a work around for this problem but to no avail. Outlined below is what I'm attempting to do in 'conventional' SQL.
UPDATE tableZ
SET columnA = (SELECT COUNT (*) AS columnA
FROM tableX
WHERE tableX.colB = 1 AND tableX.colC = 2);
The tables (Z and X) are not linked to any other tables and are empty (although theuy have structure). I have full read write permissions on the database and all its tables.
Would anoyone be able to offer adivce on how I could transform this UPDATE query into something Access (2003) would find acceptable?