Kingdee KIS&K3 Help code SQL database batch Refresh
The use of a few times, there is no write to the stored procedure or trigger inside, can be implemented by itself.
The first step is to select the database of the corresponding set of accounts, execute the following command, this is a function.
Go if exists(Select * fromsysobjectswhereName='fun_getpy' andXtype='Fn') begin Drop functionfun_getpyEnd Go Create functionFun_getpy (@str nvarchar(4000)) returns nvarchar(4000) as begin Declare @word nchar(1),@PY nvarchar(4000) Set @PY="' while Len(@str)>0 begin Set @word=left(@str,1) --If non-kanji characters, return the original characterSet @PY=@PY+( Case when Unicode(@word)between 19968 and 19968+20901 Then(Select Top 1PY from ( Select 'A' asPy,n'驁' asWordUnion All Select 'B'N'Book' Union All Select 'C'N'wrong' Union All Select 'D'N'鵽' Union All Select 'E'N'樲' Union All Select 'F'N'鰒' Union All Select 'G'N'Hiker' Union All Select 'H'N'inceѕt' Union All Select 'J'N'攈' Union All Select 'K'N'穒' Union All Select 'L'N'鱳' Union All Select 'M'N'Temperature' Union All Select 'N'N'桛' Union All Select 'O'N'漚' Union All Select 'P'N'Exposure' Union All Select 'Q'N'囕' Union All Select 'R'N'鶸' Union All Select 'S'N'蜶' Union All Select 'T'N'籜' Union All Select 'W'N'clamoring' Union All Select 'X'N'鑂' Union All Select 'Y'N'Wan Leng' Union All Select 'Z'N' the') TwhereWord>=@wordCollate Chinese_prc_cs_as_ks_wsOrder byPYASC)Else @word End) Set @str=right(@str,Len(@str)-1) End return @PY End Go --MaterialUpdateT_icitemcoreSetFhelpcode=Dbo.fun_getpy ( Left(Fname, -)) Go
The second step is to update the help codes for the places you need, materials, departments, staff, warehouses, suppliers, customers, etc.
Some table fields need to do their own correspondence, the following updates can not be applied to all versions, such as execution errors, please self-debugging, thank you
--MaterialUpdateT_icitemcoreSetFhelpcode=Dbo.fun_getpy ( Left(Fname, -)) Go--DepartmentUpdateT_departmentSetFhelpcode=Dbo.fun_getpy ( Left(Fname, -)) Go--StaffUpdateT_empSetFhelpcode=Dbo.fun_getpy ( Left(Fname, -)) Go--WarehouseUpdateT_stockSetFhelpcode=Dbo.fun_getpy ( Left(Fname, -)) Go--supplierUpdateT_supplierSetFhelpcode=Dbo.fun_getpy ( Left(Fname, -)) Go --CustomerUpdateT_organizationSetFhelpcode=Dbo.fun_getpy ( Left(Fname, -)) Go
Kingdee KIS&K3 Help code SQL database batch Refresh