Hi all,
First and foremost, I am using SQL Server 2005. I have two tables namely tbl_tickets and tbl_threads in which tbl_tickets is my master table and tbl_threads is the details table with the TicketID as their link field, for example:
tbl_Tickets
tbl_Tickets.TicketID
tbl_Tickets.TicketStatus
tbl_Threads
tbl_Threads.ThreadID
tbl_Threads.TicketID
tbl_Threads.ApprovedDate
I need an after update trigger by which tbl_Tickets.TicketStatus should be updated to 'Approved' after tbl_Threads.ApprovedDate is updated by acquiring an actual date. In case, tbl_Threads.ApprovedDate gets a null value then tbl_Tickets.TicketStatus
should be updated to 'Pending'. How should be the SQL code for such trigger and upon which table it should be wr ...
Go to the complete details ...