用友T+升级报错:CS_BankCashAccessVoucher' 已经有针对它定义的主键
问题现象:(11.510.000.0000)升级账套出错:CS_BankCashAccessVoucher' 已经有针对它定义的主键
升级出错,错误信息:升级脚本出错,错误信息:SQL 脚本: 11.510.000.0000 DATA_DSTR_FI_Vou_NL.sql 出错:表 'CS_BankCashAccessVoucher' 已经有针对它定义的主键。
解决方案:提示哪个表就删除哪个表的主键,语句如下,不能全部执行。(操作前请备份好您用友T+财务软件中的数据,可参考教程:https://new.aiufida.com/jcufida/1389.html)
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[CS_BankCashAccessVoucher]') AND name = N'PK_CS_BankCashAccessVoucher')
ALTER TABLE [dbo].[CS_BankCashAccessVoucher] DROP CONSTRAINT [PK_CS_BankCashAccessVoucher]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[CS_CashAccountPeriodBeginning_b]') AND name = N'PK_CS_CashAccountPeriodBeginning_b')
ALTER TABLE [dbo].[CS_CashAccountPeriodBeginning_b] DROP CONSTRAINT [PK_CS_CashAccountPeriodBeginning_b]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[CS_ExpenseVoucher_b]') AND name = N'PK_CS_ExpenseVoucher_b')
ALTER TABLE [dbo].[CS_ExpenseVoucher_b] DROP CONSTRAINT [PK_CS_ExpenseVoucher_b]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[CS_ExpenseVoucher_MultiSettle]') AND name = N'PK_CS_ExpenseVoucher_MultiSettle')
ALTER TABLE [dbo].[CS_ExpenseVoucher_MultiSettle] DROP CONSTRAINT [PK_CS_ExpenseVoucher_MultiSettle]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[CS_ExpenseVoucher]') AND name = N'PK_CS_ExpenseVoucher')
ALTER TABLE [dbo].[CS_ExpenseVoucher] DROP CONSTRAINT [PK_CS_ExpenseVoucher]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[CS_IncomeVoucher_b]') AND name = N'PK_CS_IncomeVoucher_b')
ALTER TABLE [dbo].[CS_IncomeVoucher_b] DROP CONSTRAINT [PK_CS_IncomeVoucher_b]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[CS_IncomeVoucher_MultiSettle]') AND name = N'PK_CS_IncomeVoucher_MultiSettle')
ALTER TABLE [dbo].[CS_IncomeVoucher_MultiSettle] DROP CONSTRAINT [PK_CS_IncomeVoucher_MultiSettle]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[CS_IncomeVoucher]') AND name = N'PK_CS_IncomeVoucher')
ALTER TABLE [dbo].[CS_IncomeVoucher] DROP CONSTRAINT [PK_CS_IncomeVoucher]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_Detail]') AND name = N'PK_ARAP_Detail')
ALTER TABLE [dbo].[ARAP_Detail] DROP CONSTRAINT [PK_ARAP_Detail]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_ExchangeAdjust]') AND name = N'PK_ARAP_ExchangeAdjust')
ALTER TABLE [dbo].[ARAP_ExchangeAdjust] DROP CONSTRAINT [PK_ARAP_ExchangeAdjust]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_ExchangeAdjust_ApDetail]') AND name = N'PK_ARAP_ExchangeAdjust_ApDetail')
ALTER TABLE [dbo].[ARAP_ExchangeAdjust_ApDetail] DROP CONSTRAINT [PK_ARAP_ExchangeAdjust_ApDetail]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_ExchangeAdjust_ArDetail]') AND name = N'PK_ARAP_ExchangeAdjust_ArDetail')
ALTER TABLE [dbo].[ARAP_ExchangeAdjust_ArDetail] DROP CONSTRAINT [PK_ARAP_ExchangeAdjust_ArDetail]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_OriginalAmount]') AND name = N'PK_ARAP_OriginalAmount')
ALTER TABLE [dbo].[ARAP_OriginalAmount] DROP CONSTRAINT [PK_ARAP_OriginalAmount]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_OriginalAmount_ApDetail]') AND name = N'PK_ARAP_OriginalAmount_ApDetail')
ALTER TABLE [dbo].[ARAP_OriginalAmount_ApDetail] DROP CONSTRAINT [PK_ARAP_OriginalAmount_ApDetail]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_OriginalAmount_ArDetail]') AND name = N'PK_ARAP_OriginalAmount_ArDetail')
ALTER TABLE [dbo].[ARAP_OriginalAmount_ArDetail] DROP CONSTRAINT [PK_ARAP_OriginalAmount_ArDetail]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_ReceivePayment]') AND name = N'PK_ARAP_ReceivePayment')
ALTER TABLE [dbo].[ARAP_ReceivePayment] DROP CONSTRAINT [PK_ARAP_ReceivePayment]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_ReceivePayment_b]') AND name = N'PK_ARAP_ReceivePayment_b')
ALTER TABLE [dbo].[ARAP_ReceivePayment_b] DROP CONSTRAINT [PK_ARAP_ReceivePayment_b]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_ReceivePayment_MultiPayment]') AND name = N'PK_ARAP_ReceivePayment_MultiPayment')
ALTER TABLE [dbo].[ARAP_ReceivePayment_MultiPayment] DROP CONSTRAINT [PK_ARAP_ReceivePayment_MultiPayment]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_ReceivePayment_MultiSettle]') AND name = N'PK_ARAP_ReceivePayment_MultiSettle')
ALTER TABLE [dbo].[ARAP_ReceivePayment_MultiSettle] DROP CONSTRAINT [PK_ARAP_ReceivePayment_MultiSettle]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_StrikeBalance]') AND name = N'PK_ARAP_StrikeBalance')
ALTER TABLE [dbo].[ARAP_StrikeBalance] DROP CONSTRAINT [PK_ARAP_StrikeBalance]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_StrikeBalance_FirstDetail]') AND name = N'PK_ARAP_StrikeBalance_FirstDetail')
ALTER TABLE [dbo].[ARAP_StrikeBalance_FirstDetail] DROP CONSTRAINT [PK_ARAP_StrikeBalance_FirstDetail]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_StrikeBalance_SecondDetail]') AND name = N'PK_ARAP_StrikeBalance_SecondDetail')
ALTER TABLE [dbo].[ARAP_StrikeBalance_SecondDetail] DROP CONSTRAINT [PK_ARAP_StrikeBalance_SecondDetail]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARAP_ExchangeAdjust]') AND name = N'PK_ARAP_ExchangeAdjust')
ALTER TABLE [dbo].[ARAP_ExchangeAdjust] DROP CONSTRAINT [PK_ARAP_ExchangeAdjust]
GO
相关文章
- 用友畅捷通T+怎么在一台电脑上安装多个版本的安装方法图文教程
- 用友畅捷通T+个别计价存货跌价损失计提的图文操作教程
- 用友畅捷通T+ T-UFO如何设置审核公式的图文操作教程
- 用友畅捷通T+T-UFO报表保存时提示:“保存失败,undefined”怎么办?
- 用友畅捷通T+11.5手机端连接提示:“地址不可用”
- 用友畅捷通T+11.51销货单如何变通使用会员储值功能的图文操作教程
- 用友畅捷通T+个别计价法二次出库不能选择对应的采购入库单怎么办?
- 用友畅捷通T+11.5如何进行跑店管理的图文操作教程
- 用友畅捷通T+T-UFO报表保存时提示:“保存失败,undefined”怎么办?
- 用友畅捷通T+自营店收银对账方式分为收银员对账和POS对账,两者有什么区别