Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Trigger

Status
Not open for further replies.

samlou

MIS
Jul 17, 2007
1
US
Got tables
Account (DeptNo, Date, StaffNo, CreditLimit)
Expense(ExpenseNo, DeptNo, Amount)

Bashing my head against a wall trying to phathom out how to create a trigger to ensure that total amount spent by a staff member doesn't exceed credit limit.

got as far as...

CREATE TRIGGER CreditLimitCheck
AFTER INSERT ON EXPENSE


End
 
What DBMS are you using? You should ask in that forum (for Oracle, SQL Server, etc...) as different products may have slightly different implementations of triggers.

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top