北京用友北京用友

您所在的位置:首页 -> 常见问题 -> 用友T+常见问题
T+常用语句
浏览:421次 评论:0条 发表日期:2020-03-02 19:08:36作者:
Tags:
收入单 [CS_IncomeVoucher_b]
 
SELECT id,* FROM  [CS_IncomeVoucher_b] WHERE idIncomeVoucherDTO='2675'
SELECT id,* FROM  [CS_IncomeVoucher_b] WHERE idIncomeVoucherDTO='2671'
SELECT * FROM  [CS_IncomeVoucher_b]
 
 
DELETE FROM [CS_IncomeVoucher_b]
where [ID] = 2708;
GO
 
 
DELETE FROM [CS_IncomeVoucher_b]
where [ID] = 2712;
GO
 
 
 
 
SELECT distiNct idIncomeVoucherDTO   FROM  UFTData587583_020111..[CS_IncomeVoucher_b]
SELECT distiNct idIncomeVoucherDTO   FROM  UFTData572607_0002011..[CS_IncomeVoucher_b]
SELECT distiNct idIncomeVoucherDTO   FROM  UFTData572607_000201..[CS_IncomeVoucher_b]
查询收入单资料重复
 
SELECT idIncomeVoucherDTO,code  FROM  [CS_IncomeVoucher_b]  group by idIncomeVoucherDTO,code having COUNT(idIncomeVoucherDTO)>1
 
 
 
 
----------------
 
销售单
 
select idSaleDeliveryDTO FROM [SA_SaleDelivery_b]  group by idSaleDeliveryDTO,code having COUNT(idSaleDeliveryDTO)=1
 
select  idSaleDeliveryDTO  FROM [SA_SaleDelivery_b] GR
where [ID] = 19335;
 
select idSaleDeliveryDTO,* FROM [SA_SaleDelivery_b]
where idSaleDeliveryDTO = 7116;
 
 
应收
select ID,* from ARAP_Detail where voucherCode='SH201911280559'
 
select ID,* from ARAP_Detail where voucherCode='SH202001040035'
 
delete from ARAP_Detail where voucherCode='SH202001040035' and id in(71314,71315,71316,71317)
 
select ID,* from ARAP_Detail where voucherCode='SR201912310140'
delete from  ARAP_Detail where voucherCode='SR201912310140' and id=70770
 
select ID,* from ARAP_Detail where voucherCode='SH202001040033'
 
select ID,* from ARAP_Detail where voucherCode='JH201903210028'
 
select ID,* from ARAP_Detail where voucherCode='SH201906220431'
 
select DISTINCT voucherCode,detailCode  from ARAP_Detail group by voucherCode,detailCode having COUNT(detailCode)>1 
 
select DISTINCT voucherCode,detailCode  from ARAP_Detail group by voucherCode,detailCode having COUNT(detailCode)>1 
r
 
select DISTINCT   voucherCode  from ARAP_Detail GROUP BY voucherCode HAVING COUNT(voucherCode)>1
 
 
select ID,* from ARAP_Detail where voucherCode='JH201903210028'
 
 
select ID,* from ARAP_Detail where voucherCode='SR201912310136'
 
DELETE FROM ARAP_Detail where voucherCode='SR201912310136' AND ID='70727'
 
select ID,* from ARAP_Detail where voucherCode='SH202001040033'
 
DELETE FROM ARAP_Detail where voucherCode='SH202001040033' AND ID IN(71304,71305,71306,71307,71308)
 
 
select    id,*  from ARAP_Detail  where voucherCode='SH202001050057' 
select    id,*  from ARAP_Detail  where voucherCode='SH202001050057' 
select DISTINCT   id,voucherCode,detailCode  from ARAP_Detail GROUP BY id,voucherCode,detailCode HAVING COUNT(voucherCode)>1
 
 
select id,* from ARAP_Detail where voucherDate>'2019-12-01 00:00:00.000' and  voucherCode in(
select DISTINCT   voucherCode  from ARAP_Detail GROUP BY voucherCode,detailCode HAVING COUNT(detailCode)>1)
 
 
select DISTINCT   voucherCode,vouchertimestamp  from ARAP_Detail GROUP BY voucherCode,vouchertimestamp HAVING COUNT(vouchertimestamp)>1
 
select    id,vouchertimestamp,*  from ARAP_Detail  where voucherCode='SH202001050057'
select    id,vouchertimestamp,*  from ARAP_Detail  where voucherCode='SH202001070146'
SR202001200060
 
select    auditBussinessFlag,docId,id,vouchertimestamp,*  from ARAP_Detail  where voucherCode='SR202001200060' or  voucherCode='SR202002170014'
select    docId,id,vouchertimestamp,*  from ARAP_Detail  where voucherCode='SR202002020001' or voucherCode='SR202002020002'
SR202002020001
,
 
update ARAP_Detail set docId=NULL where voucherCode='SR202001200060'
update ARAP_Detail set auditBussinessFlag=NULL where voucherCode='SR202001200060'
 
select docId,*  from ARAP_Detail where voucherCode='SR202001200060'
select docId,* from CS_IncomeVoucher  where code='SR202001200060'
 
收入单
select docId,*  from ARAP_Detail where voucherCode='SR202001100037'
select docId,* from CS_IncomeVoucher  where code='SR202001100037'
费用单
select docId,*  from ARAP_Detail where voucherCode='FY202002170085'
select docId,* from CS_ExpenseVoucher  where code='FY202002170085'
付款单付款单
select docId,*  from ARAP_Detail where voucherCode='FK202002140028'
select docId,* from ARAP_ReceivePayment  where code='FK202002140028'
 
如果收入单出现删除凭证后不能弃审
可尝试执行如下sql语句:
update ARAP_Detail set docId=NULL where voucherCode='SR202001200060'
update CS_IncomeVoucher set docId=NULL where code='SR202001200060'
 
 
 
收款单
 
ARAP_ReceivePayment
 
 
 
 
 
 
update CS_IncomeVoucher set docId=NULL where code='SR202001200060'
 
select docId,* from CS_IncomeVoucher  where code='SR202002020001' or code='SR202002020002'
 
采购入库单
 
CG202001290043
 
进货单
JH202001290031
JH202001250030
 
 select docid ,* from PU_PurchaseArrival where code='JH202001250030'
 
 update PU_PurchaseArrival set docid=NULL where code='JH202001250030'
 
SELECT * FROM ST_PurchaseSettleVoucher
 
销售出库单删除
select * from SA_SaleDelivery_b
select * from SA_SaleDelivery where code='SS202001050079'
销售出库单删除
select id,* from  ST_RDRecord where code='SS202001050276'
select idRDRecordDTO,* from  ST_RDRecord_b where idRDRecordDTO='12172'
 
 
select id,* from  ST_RDRecord where code='SS202001050276'
 
第一步首先要删除凭证
select idRDRecordDTO,* from  ST_RDRecord_b where idRDRecordDTO='12172'
//第二步删除销售出库单子表,其中code是出库单据号
select idRDRecordDTO,* from  ST_RDRecord_b where idRDRecordDTO in(select id from  ST_RDRecord where code='SS202001070126')
//第三步,删除销售出库单主表
select id from  ST_RDRecord where code='SS202001070126'
 
销售出库单据
 
第一步首先要删除凭证
 
//第二步删除销售出库单子表,其中code是出库单据号
delete from  ST_RDRecord_b where idRDRecordDTO in(select id from  ST_RDRecord where code='SS202001050276')
//第三步,删除销售出库单主表
delete  ST_RDRecord where code='SS202001050276'
 
SS202001070127
 
 
 
select 
 
select * from ST_RDRecord_b where id
 
出库单SS202001050276 出库单SS202001070127
销货单SH202001070086
关联销货单saleDeliveryId  出库状态isSaleOut 
 
 
select isSaleOut ,* from SA_SaleDelivery where code='SH202001070086' or code='SH202002170048'
 
 
select saleDeliveryId,id,* from  ST_RDRecord where code='SS202001070129'
 
 
销货单
 
select isSaleOut ,* from SA_SaleDelivery where code='SH202001070086' 
出库单SS202001070126
 
select id from  ST_RDRecord where code='SS202001070126'
//第二步删除销售出库单子表,其中code是出库单据号
delete from  ST_RDRecord_b where idRDRecordDTO in(select id from  ST_RDRecord where code='SS202001070128')
//第三步,删除销售出库单主表
delete  ST_RDRecord where code='SS202001070128'
 
select id from  ST_RDRecord where code='SH202001070083'
 
select isSaleOut ,* from SA_SaleDelivery where code='SH202001070083' 
 
select id from  ST_RDRecord where code='SS202001070128'
 
 
 
SS202001070128
 
 
其他应付单
CS_OtherPaymentVoucher
CS_OtherPaymentVoucher_b
 
select ID,* from CS_OtherPaymentVoucher where code='QTYF202001030001'
select * from CS_OtherPaymentVoucher_b where idOtherPaymentVoucherDTO ='139'
 
先删其他应付单除子表,
select * from CS_OtherPaymentVoucher_b where idOtherPaymentVoucherDTO in(select ID from CS_OtherPaymentVoucher where code='QTYF202001030001')
再删除主表
select ID,* from CS_OtherPaymentVoucher where code='QTYF202001030001'
 
先删其他应付单除子表,
delete from CS_OtherPaymentVoucher_b where idOtherPaymentVoucherDTO in(select ID from CS_OtherPaymentVoucher where code='QTYF202001030001')
再删除主表
delete from CS_OtherPaymentVoucher where code='QTYF202001030001'
 
现金银行日记账编辑
delete from CS_CashAccountDaily where id='17487'
 
 
select * from CS_OtherPaymentVoucher_b
其他应付单
CS_OtherPaymentVoucher
CS_OtherPaymentVoucher_b
 
先删其他应付单除子表,
delete from CS_OtherPaymentVoucher_b where idOtherPaymentVoucherDTO in(select ID from CS_OtherPaymentVoucher where code='QTYF202001030001')
再删除主表
delete from CS_OtherPaymentVoucher where code='QTYF202001030001'
 
销售出库单
 
 
select  docid,* from ST_RDRecord where code='SS202001070129'
 
update ST_RDRecord set docid=NULL where code='SS202001070129'
 
销货单
 
 
销货单的删除处理,需要先删除凭证和出库单,然后执行
delete from SA_SaleDelivery_b where idSaleDeliveryDTO in (select id from  SA_SaleDelivery where code='SH202001070086' )
 
delete from SA_SaleDelivery where code='SH202001070086' 
 
 
 
select idSaleDeliveryDTO,* from SA_SaleDelivery_b where idSaleDeliveryDTO in (select id from  SA_SaleDelivery where code='SH202001070086' )
 
select id,* from SA_SaleDelivery where code='SH202001070086' 
 
 
进货单
JH202001290031
JH202001250030
 
delete from PU_PurchaseArrival_b where idPurchaseArrivalDTO in( select id from PU_PurchaseArrival where code='JH202001250030')
delete from PU_PurchaseArrival where code='JH202001250030'
 
 select id,* from PU_PurchaseArrival where code='JH202001250030'
  select idPurchaseArrivalDTO,* from PU_PurchaseArrival_b where idPurchaseArrivalDTO in( select id from PU_PurchaseArrival where code='JH202001250030')
 
select docid,* from CS_BankCashAccessVoucher where code='BM202001070038'
 
 
银行存取单
 
如果不能重新生成凭证,执行
update CS_BankCashAccessVoucher set docid=NULL where code='BM202001070038'
 
要是重复,需要删除的话
delete from CS_BankCashAccessVoucher where code='BM202001070038'
 
 
其他应收单其他应付单
 
其他应付单
select docid,* from CS_OtherPaymentVoucher
update CS_OtherPaymentVoucher set docid=NULL where code='单据号'
 
 
其他应收单
select docid,* from  CS_OtherReceiveVoucher
update CS_OtherReceiveVoucher set docid=NULL where code='单据号'
 
入库单
CG202001010001
如果进货单和凭证已经删除了,入库单不能重新生成凭证(和出库单一样)
select  docid,* from ST_RDRecord where code='SS202001070129'
 
update ST_RDRecord set docid=NULL where code='SS202001070129'
 
进货单
JH202001010001
 
 select docid ,* from PU_PurchaseArrival where code='JH202001250030'
 
 update PU_PurchaseArrival set docid=NULL where code='JH202001250030'
 
 
 
 银行日记账
 
select id,*  from CS_CashAccountDaily where code='单据号' 
select id,*  from CS_CashAccountDaily where voucherdate='2020-01-22 00:00:00.000'
上一篇用友T+如何批量审核会计凭证
下一篇用友T+期初同步提示同步失败

最新文章

用有通提示运行时出错3290
U8登陆服务器名称为空怎么办
小微企业如何选择财务软件
资产负债表和利润表的勾稽关系不正确
资产负债表与利润表勾稽关系不对
用友U8软件资产负债表不平怎么处理
最新图文教程

北京用友远程维护收

用友软件误操作清空

U8登陆服务器名称为

用友软件中了.[geerb

T+cloud报表不平怎么

用友T+售价带出策略-

勒索病毒关键词分析

2020年9月份勒索病毒

热门文章

[10-26]
[10-08]
[09-15]
[04-02]
[03-03]
[10-18]

推荐文章

相关文章

在线咨询
售后支持
  • 业务电话:010-84986180
  • 13720089039
  • 夜间值班:18910108696
  • 北京会计QQ群:6388368