You must Sign In to post a response.
- Category: SQL Server
- #764342Hai Pinky,
In the second case, the trigger will not get fired because of the condition checking. Trigger gets fired based on the database objects like table and not based on the conditions.
So you need to do something explicitly to insert the records to the table2.
Hope it will be helpful to you.
Pawan Awasthi(DNS MVM)
+91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
- #764537Hi pinky,
1) If para1=1 then you are inserting record to Table1 through SP. which interns calls trigger placed on Table1 to insert record in table2.
Here if you want record from Table1 again then you can do that with the help of query as you are executing SP programmatically and set the parameter para1 again back to 1 so it will insert record in Table1 and so on.
2) Same SP when you are executing on sql server it will always take para1 = 1, so it is executing properly.
Hope it helps.