Yes. Just a syntax/logic issue.

I'll suggest to test "insert" query alone, once it works it will work inside the trigger.

By the way, this trigger will add a lot of overhead - hope table doesn't get a lot of insert/updates.