|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
数据库名: UFDATA_003_2002
F:\U8SOFT\Admin\SQLFILE8610\Main\Ufdata\data\NL\DATA_DATA_FA_MIX_NL.sql
错误信息:
-2147217865
对象名 'UFFA_BAK_fa_ItemsOfQuery_9' 无效。
执行如下语句时出错:
------------------------------------------------
--- UFFA_Model_表名_BAK_X 的同步变化
declare @i tinyint
set @i = 1
WHILE @i < 12
begin
if @i =1
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_1] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_1] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_1] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_1]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_1([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
else if @i = 2
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_2]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_2] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_2] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_2] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_2]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_2([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
else if @i = 3
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_3]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_3] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_3] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_3] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_3]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_3([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
else if @i = 4
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_4]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_4] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_4] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_4] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_4]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_4([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
else if @i = 5
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_5]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_5] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_5] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_5] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_5]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_5([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
else if @i = 6
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_6]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_6] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_6] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_6] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_6]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_6([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
else if @i = 7
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_7]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_7] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_7] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_7] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_7]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_7([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
else if @i = 8
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_8]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_8] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_8] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_8] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_8]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_8([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
else if @i = 9
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_9]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_9] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_9] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_9] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_9]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_9([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
else if @i = 10
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_10]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_10] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_10] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_10] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_10]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_10([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
else if @i = 11
BEGIN
if exists (select * from sysobjects where id = object_id(N'[dbo].[UFFA_BAK_fa_Items_11]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
if exists(select [sID] from [UFFA_BAK_fa_Items_11] where [sCaption] = N'减值准备' AND [sID] <> '600')
UPDATE [UFFA_BAK_fa_Items_11] SET [sCaption] = N'自定义减值准备' ,[sSysCaption] = N'自定义减值准备' where [sCaption] = N'减值准备' AND [sID] <> '600'
---------------------
if NOT EXISTS(select [sID] from [UFFA_BAK_fa_Items_11] where sID = '600')
BEGIN
INSERT INTO [UFFA_BAK_fa_Items_11]([sID], [sName], [sCaption], [sEngCaption], [sSysCaption], [sEngSysCaption], [bVisible], [bDel], [bMove], [bIsValue], [bAutoPop], [bQuery], [lQueryOrder], [sType],
[bDepr], [bEvn], [sSourceTable], [bEdit], [bAllowNull], [iIntLength], [iPointLength], [memFormula], [memUsedItems], [memItemsUseMe], [iDictType], [iDefineType], [lByUsed], [sHelpID], [sRemark], [sLockedBy])
VALUES('600','dblSubDecValueT',N'减值准备',NULL,N'减值准备',NULL,1,0,0,1,0,1,NULL,'dblDouble',0,0,'fa_Cards.dblDecPreValueT-fa_Cards.dblRetDecPreValueT',0,1,13,2,Null,Null,Null,16,0,0,Null,Null,Null)
---
INSERT UFFA_BAK_fa_ItemsOfQuery_11([iQuerysType], [sName]) VALUES(1,'dblSubDecValueT')
END
END
END
set @i=@i+1
end
那位大大知道怎么解决 |
|