April 11, 2008 at 4:37 pm
hi friends this is my first participation here in bref i have create a trigger on my table named customers the question is how to shwo the number pf lines on this table at every new added line this is my trigger
Create Trigger Add On Customers For Insert as
declare @number int
Select @number=count(*) from Customers
' here i needto show the message i have used messageerror but it blok the user and don't allow to him to add other new line and print it don't show the message i am so interestion on this message plz help me friends and thank you.
April 12, 2008 at 8:18 am
ooooooooh my god 13 view without any reply
April 21, 2008 at 6:07 am
[font="Courier New"]Try the below piece of code..
Create Trigger Add On Customers After Insert as
declare @number int
Select @number=count(*) from Customers
Print @number
In the above code you have used For trigger and hence when a insert happens it will block it and use the code inside the trigger.. Now i've replaced this with After and hence once insert completes it will print the number of rows in the table 🙂
If you still face any error post back with the error!!![/font]
Regards..Vidhya Sagar
SQL-Articles
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply