October 24, 2008 at 5:16 am
How do I create an sql script that that would inform me if the table I have created has more than the specified amount that I have set it to please. Thanx.
October 24, 2008 at 5:18 am
Can u explain in detail.
"Keep Trying"
October 28, 2008 at 10:29 am
I am looking for an sql script that sends an alert if the table has more that 400 records please.
October 28, 2008 at 1:08 pm
sel, you could try something like this
CREATE TRIGGER tr_test_trigger
ON YourTable
FOR INSERT
AS
IF @@ROWCOUNT = 0 RETURN
IF (SELECT COUNT(*) FROM YourTable) > = 400
BEGIN
Run your alert code here
END
Greg
_________________________________________________________________________________________________
The glass is at one half capacity: nothing more, nothing less.
October 29, 2008 at 4:37 am
You could write the alert related code in a stored procedure if you are using a stored proc to insert data. BTW what sort of alert did you have in mind?
"Keep Trying"
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply