找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 3630|回复: 9

[求助] 求助,U88.21升级10.1出错!!!谢谢大家

[复制链接]
发表于 2012-11-21 10:52:51 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
帮忙看看谢谢大家,在860升级861的时候报错了
数据库名: UFDATA_001_2001
D:\U8SOFT\Admin\SQLFILE8610\Main\Ufdata\data\NL\DATA_DATA_FA_MIX_NL.sql
错误信息:
-2147217865
对象名 'UFFA_BAK_fa_ItemsOfQuery_7' 无效。

执行如下语句时出错:

------------------------------------------------
---        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
 楼主| 发表于 2012-11-21 10:55:44 | 显示全部楼层
没人回复啊  我顶~~~~~~~~~~
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2012-11-21 11:06:13 | 显示全部楼层
没人回复啊  我顶~~~~~~~~~~
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2012-11-21 11:24:50 | 显示全部楼层
没人回复啊  我顶~~~~~~~~~~
回复 点赞 拍砖

使用道具 举报

发表于 2012-11-21 11:43:37 | 显示全部楼层
从正常帐套复制过来啊,是一张表
回复 点赞 拍砖

使用道具 举报

发表于 2012-11-21 12:42:28 | 显示全部楼层
不就是数据表吗,你一个一个写代码拉过来就行了
回复 点赞 拍砖

使用道具 举报

发表于 2012-11-21 13:07:58 | 显示全部楼层
从升级好的帐套数据库里拷贝UFFA_BAK_fa_ItemsOfQuery_7表到问题数据库
回复 点赞 拍砖

使用道具 举报

发表于 2012-11-21 14:34:37 | 显示全部楼层
按楼上的说来做可以了!
回复 点赞 拍砖

使用道具 举报

发表于 2012-11-21 20:35:19 | 显示全部楼层
试着用U852过度一下呢?
回复 点赞 拍砖

使用道具 举报

发表于 2012-11-21 20:42:31 | 显示全部楼层
学习,暂时还没遇到过这种问题
回复 点赞 拍砖

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-5-25 16:45 , Processed in 0.036877 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表