Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mcbtiger
Starting Member
4 Posts |
Posted - 2010-05-13 : 14:25:03
|
| Hello I have same problem to create trigger i create two tables 1) is Cusotmer profiles and 2)Customer Buy 1) Customer profile table consist 4 fields CustomerID CustomerName CustomerBalance Status02 Jack 4500 Disable2) CustmerID Producet Qty TotalAmount 02 Fish 4 350 02 Oil 1 150i want to create trigger that if Customer profile status field is (Disable).block insert new enter in CustomerBuy table where CustomerID 02 create trigger block on CustomerBuyfor insertasif insert(CustomerBuy.Client)beginif exists (select status from inserted where status='Enable') rollback endMuhammadali |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2010-05-13 : 15:48:34
|
Can you explain this a little bit? quote: block insert new enter in CustomerBuy table where CustomerID 02
Not exactly clear with the requirement. |
 |
|
|
|
|
|