cool hit counter gold butterflyKIS&K3 mnemonic codeSQL Database batch refresh_Intefrankly

gold butterflyKIS&K3 mnemonic codeSQL Database batch refresh


gold butterflyKIS&K3 mnemonic codeSQL Database batch refresh

It's not used much, so it's not written inside a stored procedure or trigger, it can be implemented on its own.

The first step is to select the database corresponding to the ledger and execute the following command, which is a function.

go 
if exists (select * from sysobjects where name='fun_getPY' and xtype='Fn') 
begin 
drop function fun_getPY 
end 
go 
create function fun_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-Chinese characters, Return the original character 
set @PY=@PY+(case when unicode(@word) between 19968 and 19968+20901 
then (select top 1 PY from ( 
select 'A' as PY,N' very expensive' as word 
union all select 'B',N' a book' 
union all select 'C',N' Wrong' 
union all select 'D',N' (dialect) silk' 
union all select 'E',N' acid variety of jujube plum' 
union all select 'F',N' eminent' 
union all select 'G',N' a kind of a gun' 
union all select 'H',N' dense' 
union all select 'J',N' port' 
union all select 'K',N' place name' 
union all select 'L',N' bespoke' 
union all select 'M',N' phonetic "myeo" used in place names (Korean gugja)' 
union all select 'N',N' The Needle' 
union all select 'O',N' lame' 
union all select 'P',N' air' 
union all select 'Q',N' flanker' 
union all select 'R',N' siskin' 
union all select 'S',N' lane' 
union all select 'T',N' desmond' 
union all select 'W',N' cunning' 
union all select 'X',N' beaten' 
union all select 'Y',N' rhyme' 
union all select 'Z',N' here it is' 
) T 
where word>=@word collate Chinese_PRC_CS_AS_KS_WS 
order by PY ASC) else @word end) 
set @str=right(@str,len(@str)-1) 
end 
return @PY 
end 
go 

-- material
update     t_ICItemCore set FHelpcode=dbo.fun_getPY(left(Fname,30)) 
go

Step 2, update the helper codes where you need them, materials, departments, staff, warehouses, suppliers, customers, etc.

Some form fields need to do their own correspondence, the following update can not be applied to all versions, if the implementation of the error, please debug yourself, thanks!

-- material
update     t_ICItemCore set FHelpcode=dbo.fun_getPY(left(Fname,30)) 
go


-- sector
update     t_Department set FHelpcode=dbo.fun_getPY(left(Fname,30)) 
go


-- staff member
update      t_Emp  set FHelpcode=dbo.fun_getPY(left(Fname,30)) 
go


-- warehouse
update      t_Stock  set FHelpcode=dbo.fun_getPY(left(Fname,30)) 
go

-- suppliers
update       t_Supplier  set FHelpcode=dbo.fun_getPY(left(Fname,30)) 
go

    

-- clients
update       t_Organization set FHelpcode=dbo.fun_getPY(left(Fname,30)) 
go

Recommended>>
1、Urgent notice on security protection against GlobeImposter series of ransomware viruses
2、Combining perceptual and conceptual thinking DeepMind proposes the microinducible logic framework ILP
3、TBLXHelloFuture meets the future of IoTenabled new business
4、Fun and driveable the DS7 a French car becomes a smart driving pioneer in the 300000 class
5、Go AI Lilla praised as close to professional level but its author is a programmer who doesnt know how to play chess

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号