Updated tigger query for tbl_chatlog