mercredi 28 février 2018

Create Triggers while scanning a table

Context: This is a institution that allow you to borrow and return things.

I have a table: 1) LENDRETURN_ITEMS (column: CardNo, BorrowOrReturn, DateTime, ItemNo)

I would need to create a Trigger such that, when I include a new LENDRETURN_ITEM entry, it would scan all previous entries to check if the CardNo exceeded the Lend Limit of 5. If it exceeds 5, then stop the entry from going into LENDRETURN_ITEMS.

The LENDRETURN_ITEMS also includes returned items...

Any ideas? Thank you!

Aucun commentaire:

Enregistrer un commentaire