Need help with assignment question! Need to use update with a sub-query to add correct days into different rows who match with proper column and row from other table. Trying to update the due date (7 days + checkedOut date) of entries with DVD only. SO far i tried using following code
UPDATE LOAN
SET (SELECT DUEDATE
FROM Media
JOIN Item USING (MediaID)
JOIN InventoryItem USING (ItemID)
JOIN Loan USING (InventoryItemID)
WHERE MediaCode = 'DVD') = DATETIME (checkedOut, '+7 days')
For some reasons it keep giving me error "near "(": syntax error: " when trying to run it. Simply I want to change all the due dates of DVD's to add correctly (7 days) according to checkedout date. Any help will be appreciated.
Aucun commentaire:
Enregistrer un commentaire