Hi,
I am relatively new to access and was trying to do a select count distinct values for a table. Reading a few sites on google, I know that access does not support this. This is for a school project and I am starting to pull my hair out. The database is for a library inventory system. I have 2 tables: Book_Copy and Inventory. Book_Copy has the columns (Copy_ID, Book_ID Checkout Date, Check In Date and Due Date, Status). The inventory table has columns: Inventory ID, Book _ID and Available Copies. I am trying to update the Inventory table, Available copies column based on the status (checked in) in the Book_Copy table. I have tried to write an update query trying different ways but all I end up getting is syntax errors. Any help would be appreciated. This is what I have tried:
UPDATE Inventory
SET Inventory.Available_Copies = (SELECT COUNT (*) AS Count from (Select DISTINCT BOOK_ID from BOOK_COPY where Book_Copy.Status_abbrv = 'CI');