用友t3升级报错列名cmemo无效和对象名dbost calbeginvage无效Word文档格式.docx

上传人:b****6 文档编号:16239607 上传时间:2022-11-21 格式:DOCX 页数:13 大小:335.53KB
下载 相关 举报
用友t3升级报错列名cmemo无效和对象名dbost calbeginvage无效Word文档格式.docx_第1页
第1页 / 共13页
用友t3升级报错列名cmemo无效和对象名dbost calbeginvage无效Word文档格式.docx_第2页
第2页 / 共13页
用友t3升级报错列名cmemo无效和对象名dbost calbeginvage无效Word文档格式.docx_第3页
第3页 / 共13页
用友t3升级报错列名cmemo无效和对象名dbost calbeginvage无效Word文档格式.docx_第4页
第4页 / 共13页
用友t3升级报错列名cmemo无效和对象名dbost calbeginvage无效Word文档格式.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

用友t3升级报错列名cmemo无效和对象名dbost calbeginvage无效Word文档格式.docx

《用友t3升级报错列名cmemo无效和对象名dbost calbeginvage无效Word文档格式.docx》由会员分享,可在线阅读,更多相关《用友t3升级报错列名cmemo无效和对象名dbost calbeginvage无效Word文档格式.docx(13页珍藏版)》请在冰豆网上搜索。

用友t3升级报错列名cmemo无效和对象名dbost calbeginvage无效Word文档格式.docx

5CAierwr^^t

啊韵说,.,—世」

価面1诵曹RH鮭曲解巨]!

“时巳鮎刊:

難斟—I

*“<

榻岀.尽皿41询a^-Sr'

jFSEntEiitifi-aa-zssz「戸怯.电比件】

A如果出现以下情况:

对象名dbo.ST_CalBegInvAge无效

"

信息升级到T3-用友iiia8pi”2

O

数据库名:

UFDATA.005.2014

-214721786S

对象名rdbo.ST.CalBeglnvAge*无&

执行如玉這句时爲错:

_计算上糜

ALTERPROCEDURE[dbo].[ST.CalBegInvAge]©

cDBNameVarcharC20).一上一称

©

CurrentDateDatetime.••计真日期

cCurDBNamevarchar(20)一当前账套名称As

Declare@strLuftQtynVarchar(4000)

Declare@StockStartDatedatetime

declare©

cWhCodenvarchar(50)declare@cIrwCodenvarchar(50)declare@cBatchnvarchar(50)declare@cFreelnvarchar(120)declare@cFree2nvarchar(L20)declare@iQttyfloatdeclare©

iNumfloat

declare@autoldint

iVouchQttyfloatdeclareOiVouchNumfloatdeclare@iTempQttyfloatdedare©

iTempNumfloat

declare@strSQUnvAgenVarchar(4CKX>

)declare©

strlnvAgenVarchar(4000)declare©

strSQLlnnVarchar(4000)declare©

strSQLOutnV«

archar(4000)declare©

strNewRecordnVarchaT(4000)

declare@strSqlnVarchar(200)

declare@sSQLnVarchar(200)declare©

sBegdateAsnVarchar(2CX))

iCouint

请在数据库2008中执行文件:

对象名dbo.ST_CalBeglnvAge无效.sql步骤如下

1在开始程序的打开SQL2008如图

点连接进入

 

选文件/打开/文件,路径用友相关

点执行就行了

附:

数据库语句

--账套005年度为2014升级时,软件报错对象名dbo.ST_CalBegInvAge无效--请执行以下语句

useufdata_005_2014

altertableMatchVouchaddbReqAnalysebit,dIssueDatevarchar(16)

GO

/******对象:

StoredProcedure[dbo].[ST_CalBegInvAge]脚本日期:

08/15/201413:

12:

13******/

SETANSI_NULLSON

SETQUOTED_IDENTIFIERON

--计算上年结存库龄

CREATEPROCEDURE[dbo].[ST_CalBegInvAge]

@cDBNameVarchar(20),--上一个账套名称

@CurrentDateDatetime,--计算日期

@cCurDBNamevarchar(20)--当前账套名称

As

Declare@strLeftQtynVarchar(4000)

declare@cWhCodenvarchar(50)

declare@cInvCodenvarchar(50)

declare@cBatchnvarchar(50)

declare@cFree1nvarchar(120)

declare@cFree2nvarchar(120)

declare@iQttyfloat

declare@iNumfloat

declare@autoIdint

declare@iVouchQttyfloat

declare@iVouchNumfloat

declare@iTempQttyfloat

declare@iTempNumfloat

declare@strSQLInvAgenVarchar(4000)

declare@strInvAgenVarchar(4000)

declare@strSQLInnVarchar(4000)

declare@strSQLOutnVarchar(4000)

declare@strNewRecordnVarchar(4000)

declare@sSQLnVarchar(200)

declare@sBegdateAsnVarchar(200)

declare@iCouint

--取库存启用日期

Set@sBegdate=N'

select@StockStartDate=cast(cValueasDatetime)from'

+

@cDBName+'

..accinformation'

+'

WherecSysid='

ST'

andcName='

dSTStartDate'

execsp_executesql@sBegdate,N'

@StockStartDatedatetimeoutput'

@StockStartDate

output

If@StockStartDateisNull

Begin

Return

End

--计算本期当前结存

Set@strNewRecord=N'

InsertInto'

+@cDBName+'

..STStockAgeTempTable(autoid,iqtty,

inum)

values(@autoid,@iTempQtty,@iTempNum)'

set@strLeftQty=

SELECTcWhCode,

cInvCode,

IsNull(cBatch,'

)AscBatch,

IsNull(cFree1,'

)AscFree1,

IsNull(cFree2,'

)AscFree2,

SUM(casewhenbRdFlag=1theniQuantityelse-iQuantityend)asiQtty,

SUM(casewhenbRdFlag=1theniNumelse-iNumend)ASiNum

From(SelectbRdFlag,cWhCode,cInvCode,iQuantity,INum,cBatch,cFree1,cFree2

From'

+@cDBName+'

..ST_BegInvAge

UnionALL

SelectR.bRdFlag,R.cWhCode,Rs.cInvCode,Rs.iQuantity,Rs.INum,Rs.cBatch,Rs.cFree1,

Rs.cFree2

+@cDBName+'

..RdRecordRinnerjoin'

..RdRecordsRsonR.id=Rs.id

WhereR.dDate>

=@StartDateAndR.dDate<

=@CurrentDateAndcVouchType<

>

'

33'

AndcVouchType<

34'

)X

groupbycWhCode,cInvCode,IsNull(cBatch,'

),IsNull(cFree1,'

),IsNull(cFree2,'

)'

--取入库语句

Set@strSQLIn='

SelectAutoId,iQtty,iNum

From(SelectdDate,AutoId,abs(iQuantity)AsiQtty,abs(iNum)AsiNum

WherecWhCode=@cWhCodeandcInvCode=@cInvCodeandisnull(cBatch,'

)=@cBatch

andisnull(cFree1,'

)=@cFree1andisnull(cFree2,'

)=@cFree2

Selectd.dDate,ds.autoid,Abs(ds.iQuantity)asiQtty,Abs(ds.iNum)asiNum

from'

..RdRecorddjoin'

+@cDBName+'

..RdRecordsdson(d.id=ds.id)

where((d.bRdFlag=1andds.iQuantity>

0)or(d.bRdFlag<

1andds.iQuantity<

0))

Andd.dDate>

=@StartDateandd.dDate<

=@CurrentDateandd.cWhCode=@cWhCode

andds.cInvCode=@cInvCodeandIsNull(ds.cBatch,'

)=@cBatchandIsNull(ds.cFree1,'

)=@cFree1

andIsNull(ds.cFree2,'

)=@cFree2)X

orderbydDateDesc,AutoIDDescforreadonly'

Set@strSQLIn=N'

declarecurInvIninsensitivecursorfor'

+@strSQLIn

set@strLeftQty=N'

declarecurRdcursorfor'

+@strLeftQtyexecutesp_executesql@strLeftQty,

N'

@CurrentDateDatetime,@StartDateDatetime'

@CurrentDate,@StockStartDate

opencurRd

fetchnextfromcurRdinto

@cWhCode,@cInvCode,@cBatch,@cFree1,@cFree2,@iQtty,@iNum

--建立计算结果临时表

Set@sSQL=N'

select@Num=count

(1)from'

+@cDBName+

..sysobjects'

Where

name='

STStockAgeTempTable'

execsp_executesql@sSQL,N'

@Numintoutput'

@iCououtput

If@iCou<

0

Exec('

DropTable'

+@cDBName+'

..STStockAgeTempTable'

CreateTable'

..STStockAgeTempTable(autoIdint,

iQttyfloat,

iNumfloat)'

--sp_helpST_BegInvAge

while@@fetch_status=0

begin

if(@iQtty<

0)set@iQtty=0

if(@iNum<

0or@iNumisnull)set@iNum=0

Set@iTempQtty=0.0

Set@iTempNum=0.0

--按降序取入库

executesp_executesql@strSQLIn,

@CurrentDateDatetime,@StartDateDatetime,@cWhCodevarchar(50),@cInvCodevarchar(20),@cBatchvarchar(50),

@cFree1varchar(120),@cFree2varchar(120)'

@CurrentDate,@StockStartDate,@cWhCode,@cInvCode,@cBatch,@cFree1,@cFree2

opencurInvIn

fetchnextfromcurInvIninto@autoId,@iVouchQtty,@iVouchNum

while(round(@iQtty,6)>

0orround(@iNum,6)>

0)and@@fetch_status=0

ifRound(@iQtty,6)>

Round(@iVouchQtty,6)

set@iTempQtty=@iVouchQtty

set@iQtty=Round(@iQtty,6)-Round(@iVouchQtty,6)end

elsebegin

set@iTempQtty=@iQtty

set@iQtty=0.0end

ifRound(@iNum,6)>

Round(@iVouchNum,6)

set@iTempNum=@iVouchNum

set@iNum=Round(@iNum,6)-Round(@iVouchNum,6)end

set@iTempNum=@iNum

set@iNum=0.0end

--增加计算结果

executesp_executesql@strNewRecord,

@autoidint,@iTempQttyfloat,@iTempNumfloat'

@autoid,@iTempQtty,@iTempNum

fetchnextfromcurInvIninto@autoid,@iVouchQtty,@iVouchNumend

closecurInvIn

deallocatecurInvIn

fetchnextfromcurRdinto@cWhCode,@cInvCode,@cBatch,@cFree1,@cFree2,@iQtty,@iNumend

closecurRd

deallocatecurRd

--将结果数据输出

set@strSQLInvAge=N'

Select[ID],[bRdFlag],[cVouchType],[cWhCode],[dDate],[cCode],[cRdCode],[cDepCode],[cPersonCode],[cVenCode],

[cHandler],[cMemo],[cMaker],[cDefine1],[cDefine2],

[cDefine3],[cDefine4],[cDefine5],[cDefine6],[cDefine7],

[cDefine8],[cDefine9],[cDefine10],RT.[AutoID],[cInvCode],

(casewhenx.bRdFlag=0then-1*RT.[iNum]elseRT.[iNum]end)AsiNum,

(casewhenx.bRdFlag=0then-1*RT.[iQtty]elseRT.[iQtty]end)

AsiQuantity,

[iUnitCost],[iPrice],[cBatch],[cFree1],

[cFree2],[dVDate],[cDefine22],[cDefine23],[cDefine24],

[cDefine25],[cDefine26],[cDefine27],[cItem_class],[cItemCode],

[cName],[cItemCName]

Into'

+@cCurDBName+'

..STStockAgeTempTableRTInnerJoin(Select[ID],[bRdFlag],[cVouchType],[cWhCode],[dDate],[cCode],[cRdCode],[cDepCode],[cPersonCode],[cVenCode],[cHandler],[cMemo],[cMaker],[cDefine1],[cDefine2],[cDefine3],[cDefine4],[cDefine5],[cDefine6],[cDefine7],[cDefine8],[cDefine9],[cDefine10],[AutoID],[cInvCode],[iNum],[iQuantity],[iUnitCost],[iPrice],[cBatch],[cFree1],[cFree2],[dVDate],[cDefine22],[cDefine23],[cDefine24],[cDefine25],[cDefine26],[cDefine27],[cItem_class],[cItemCode],[cName],[cItemCName]

UnionAll

SelectR.[ID],[bRdFlag],[cVouchType],[cWhCode],[dDate],[cCode],[cRdCode],[cDepCode],[cPersonCode],[cVenCode],[cHandler],[cMemo],[cMaker],[cDefine1],[cDefine2],[cDefine3],[cDefine4],[cDefine5],[cDefine6],[cDefine7],[cDefine8],[cDefine9],[cDefine10],[AutoID],[cInvCode],[iNum],[iQuantity],[iUnitCost],[iPrice],[cBatch],[cFree1],[cFree2],[dVDate],[cDefine22],[cDefine23],[cDefine24],[cDefine25],[cDefine26],[cDefine27],[cItem_class],[cItemCode],[cName],[cItemCName]

..RdRecordsRsinnerjoin'

..RdRecordR

On(R.ID=Rs.ID)

WheredDate>

=@StartDateAnddDate<

=@CurrentDateAndcVouchType

<

AndcVouchType<

”34”

)XOnRT.autold=X.autold

executesp_executesql@strSQLInvAge,

@CurrentDateDatetime,@StartDateDatetime'

@CurrentDate,

@StockStartDate

然后再回到系统管理/系统/升级SQLSERVE数据

『阳1己件】

选择005账套的2014\2015年度,升级

提示成功

蜃T卜辰诗⑴百蓉黑粋

RlftcSIlM5fAj

予融丁―

控制告

血羽新I沽!

tiiVg宣―

V^Kftaid

3!

底加4.蒯>匕息刊犯尊trfi

F-.U^M1R-AdnirH^-V.

斗■乍4.血口|It^-Si(FSEE*TEI

B,如果出现以下情况:

列名cMem(无效

请执行这个文件:

更新数据库MatchVouchs.sql

--账套116年度为2016升级时,软件报错列名cMem(无效

--请执行以下语句

USEUFDATA_116_2016

altertableMatchVouchsaddcMemo[varchar](255)NULL

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 历史学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1