/******************************************************
*
* by Mariano Gomez, MVP
*
*******************************************************/
use DYNAMICS;
GO
declare @sourceUser char(20); set @sourceUser = 'LESSONUSER2';
declare @destntUser char(20); set @destntUser = 'LESSONUSER1';
if exists(select * from SY01990 where ScbOwnerID = @destntUser)
delete from SY01990 where ScbOwnerID = @destntUser;
insert into SY01990 (
ScbGroupType,
ScbOwnerID,
ScbNodeID,
ScbParentNodeID,
ScbShortcutType,
ScbSubType,
ScbDisplayName,
ScbShortcutKey,
ScbTargetStringOne,
ScbTargetStringTwo,
ScbTargetStringThree,
ScbTargetLongOne,
ScbTargetLongTwo,
ScbTargetLongThree,
ScbTargetLongFour,
ScbTargetLongFive,
ScbCompanyID)
select
ScbGroupType,
@destntUser,
ScbNodeID,
ScbParentNodeID,
ScbShortcutType,
ScbSubType,
ScbDisplayName,
ScbShortcutKey,
ScbTargetStringOne,
ScbTargetStringTwo,
ScbTargetStringThree,
ScbTargetLongOne,
ScbTargetLongTwo,
ScbTargetLongThree,
ScbTargetLongFour,
ScbTargetLongFive,
ScbCompanyID
from SY01990
where ScbOwnerID = @sourceUser
GO
use DYNAMICS;
GO
declare @sourceUser char(20); set @sourceUser = 'LESSONUSER2';
declare @destntUser char(20); set @destntUser = 'LESSONUSER1';
if exists(select * from SY01990 where ScbOwnerID = @destntUser)
delete from SY01990 where ScbOwnerID = @destntUser;
insert into SY01990 (
ScbGroupType,
ScbOwnerID,
ScbNodeID,
ScbParentNodeID,
ScbShortcutType,
ScbSubType,
ScbDisplayName,
ScbShortcutKey,
ScbTargetStringOne,
ScbTargetStringTwo,
ScbTargetStringThree,
ScbTargetLongOne,
ScbTargetLongTwo,
ScbTargetLongThree,
ScbTargetLongFour,
ScbTargetLongFive,
ScbCompanyID)
select
ScbGroupType,
@destntUser,
ScbNodeID,
ScbParentNodeID,
ScbShortcutType,
ScbSubType,
ScbDisplayName,
ScbShortcutKey,
ScbTargetStringOne,
ScbTargetStringTwo,
ScbTargetStringThree,
ScbTargetLongOne,
ScbTargetLongTwo,
ScbTargetLongThree,
ScbTargetLongFour,
ScbTargetLongFive,
ScbCompanyID
from SY01990
where ScbOwnerID = @sourceUser
GO
No comments:
Post a Comment