【U8】数据库中删除(修改、复制、替换)某个操作员的权限

【问题描述】
在用友U8+软件中,
账套和年度太多,想要快速删除(修改、复制、替换)改某个操作员的权限。

【解决方法】
在ufsystem数据库中的UA_HoldAuth -----操作员权限分配表
查询某个操作员权限:select * from ua_holdauth where cuser_id='操作员账号'
删除某个账套的权限:delete ua_holdauth where cuser_id='操作员账号' and cacc_id='账套号'

案例一:
删除【操作员076】的权限,不包含021账套。

select * from ua_holdauth 
where cUser_Id='076' 
and cAcc_Id != '021'

案例二:
复制【076操作员,046账套,2018年权限】,到【996账套,2021年】。

insert into ua_holdauth (cacc_id,iYear,cuser_id,cauth_id,iIsUser,cSub_id,cAuthType)
select '996','2021',cuser_id,cauth_id,iIsUser,cSub_id,cAuthType   
from ua_holdauth 
where cUser_Id='076' and cAcc_Id='046' and iYear='2018'

案例三:
复制【031操作员,010账套,2018年权限】,到【110操作员,996账套,所有年度中】。

insert into ua_holdauth (cacc_id,iYear,cuser_id,cauth_id,iIsUser,cSub_id,cAuthType)
select '996',ND.iBeginYear,'110',a.cauth_id,a.iIsUser,a.cSub_id,a.cAuthType   
from ua_holdauth a
left join (select cacc_id,iBeginYear from UA_AccountDatabase   ) ND 
on (ND.cAcc_Id='996') 
where a.cUser_Id='031' and a.cAcc_Id='010' and a.iyear='2018'
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值