Hi, I'm trying to do an update query but I'm getting something wrong
Table1(ID, Name, TypeID, Count, TypeACount, TypeBCount)
Table2(TypeID, TypeName)
update Table1
set TypeACount = Count
where TypeID in (select TypeID
from Table2
where TypeName like "*Type A*")
I want to put the value from 'Count' into TypeACount, if the TypeID relates to 'Type A's
The query runs successfully, and shows the TypeACount column with the correct number of rows that _should_ be changed, but nothing gets put into the column. The select part works, and when run by itself, returns a single column of numbers. I tried first with 'where TypeID = (select TypeID ...' but Access said query must return at most one value.
what am i doing wrong?
tia
mcalex
Table1(ID, Name, TypeID, Count, TypeACount, TypeBCount)
Table2(TypeID, TypeName)
update Table1
set TypeACount = Count
where TypeID in (select TypeID
from Table2
where TypeName like "*Type A*")
I want to put the value from 'Count' into TypeACount, if the TypeID relates to 'Type A's
The query runs successfully, and shows the TypeACount column with the correct number of rows that _should_ be changed, but nothing gets put into the column. The select part works, and when run by itself, returns a single column of numbers. I tried first with 'where TypeID = (select TypeID ...' but Access said query must return at most one value.
what am i doing wrong?
tia
mcalex