资金常用查询语句(仅供参考)
仅供参考,具体问题请以集团研发提供方法为准。
1、查询登账方式
SELECT * FROM T_BAS_PARAMITEM where FKEYID in (select fid from T_BAS_PARAM where fnumber='CS001') and FORGUNITID in (select fid from T_ORG_COMPANY where fnumber in ('组织编码'))
2、查询银行交易明细是否重复
SELECT * from T_BE_TRANSDETAIL where FTRANPACKAGEID in (
select FTRANPACKAGEID from T_BE_TRANSDETAIL group by FTRANPACKAGEID having count(FTRANPACKAGEID) > 1)
加完唯一约束 重复数据就插入不进来数据库
ALTER TABLE T_BE_TRANSDETAIL ADD CONSTRAINT TRANSDETAIL_U1 UNIQUE (ftranpackageid);
3、修改登账方式
--备份 填入组织编码
SELECT * into bak_casparam001 FROM T_BAS_PARAMITEM where FKEYID in (select fid from T_BAS_PARAM where fnumber='CS001') and FORGUNITID in (select fid from T_ORG_COMPANY where fnumber in ('组织编码'))
--改成凭证登账
update T_BAS_PARAMITEM set FVALUE_L1='1' ,FVALUE_L2='1' ,FVALUE_L3='1',FVALUEALIAS_L2='凭证登账', FVALUEALIAS_L1='凭证登账',FVALUEALIAS_L3='凭证登账' where fid in (select fid from bak_casparam001 )
--改成单据登账
update T_BAS_PARAMITEM set FVALUE_L1='0' ,FVALUE_L2='0' ,FVALUE_L3='0',FVALUEALIAS_L2='单据登账' , FVALUEALIAS_L1='单据登账',FVALUEALIAS_L3='单据登账' where fid in (select fid from bak_casparam001 )
资金常用查询语句(仅供参考)
本文2024-09-16 22:07:46发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-46113.html