I'm creating a trigger:
CREATE OR REPLACE TRIGGER ItemAvgRatingTrigger
AFTER INSERT OR UPDATE OF rating ON Collectionitems
REFERENCING NEW AS newRow
FOR EACH ROW
BEGIN
UPDATE Item
SET rating = (SELECT AVG(Collectionitems.rating) FROM Collectionitems, Item WHERE
Collectionitems.itemid = newRow.itemid AND newRow.itemid = Item.itemid)
WHERE Item.itemid = newRow.itemid;
END ItemAvgRatingTrigger;/
Whenver I run the trigger by updating a row in Collectionitems I get squirrel returning this :
Error: ORA-04098: trigger 'CA0513.ITEMAVGRATINGTRIGGER' is invalid and failed re-validation
SQLState: 42000
ErrorCode: 4098
Position: 7
Executing SQL statement:
SELECT * FROM User_Errors;
Generates 1 error:
PLS-00103: Encountered the symbol "/" The symbol "/" was ignored./n
I've read quite a few posts with others having the same problem but haven't found a solution yet, any ideas?