The documentation says that you cannot reference tables, but that restriction was lifted in 5.0.3 and it is now possible.
I can see one obvious problem in this statement:
UPDATE _Attachments SET
RelAttNumber = INSERTED.AttNumber
FROM INSERTED
WHERE INSERTED.AttachmentCode = _Attachments.AttachmentCode;
INSERTED is a special SQLServer table used to store the incoming record. The way you reference the incoming record in MySQL is by the NEW keyword. Your statement should look something like this in MySQL:
UPDATE _Attachments SET
RelAttNumber = NEW.AttNumber
WHERE NEW.AttachmentCode = _Attachments.AttachmentCode;
Hope that helps.
Mike Kruckenberg
Co-author of Pro MySQL (Apress)
http://mike.kruckenberg.com