declare @tmessageid bigint
set @tmessageid = (select isnull(MAX(tmessageid), 0)
                   from tmessage)
insert into tmessage
(tmessageid, siteid, createdate, rmkenable, fmessage, ftype, fisread, freaddate, tenterprise_userid,objectname,objectid)
select @tmessageid + 1, $siteid$, getDate(), 0, $fmessage$, $ftype$, 0, null,$tenterprise_userid$,'tagents_workerscoremx',$tagents_workerscoremxid$
