SET IDENTITY_INSERT dbo.online_module ON;
declare @eid int;
set @eid=ident_current('dbo.online_module');
insert into online_module(ModuleID,ApplicationsID,CName,Directory,img,IsSystem,OrderLevel,[Close],EnName,Show,[System],PageCode,TmpParentID,parentid)
select ModuleID+@eid,ApplicationsID,CName,Directory,img,IsSystem,OrderLevel,[Close],EnName,Show,[System],PageCode,TmpParentID,case parentid when 0 then 0 else parentid+@eid end from dbo.online_module
where belongid =1
SET IDENTITY_INSERT dbo.online_module OFF;