摘要:
1 create Function [dbo].[HZToPY](@HZ VarChar(255)) 2 Returns VarChar(255) 3 As 4 Begin 5 Declare @PY VarChar(255),@LenHZ int,@i int,@FristWord VarChar(2) 6 Set @LenHZ = Len(@HZ) 7 Set @i = 1 8 Set @PY = '' 9 While @i <= @LenHZ10 Begin 11 Set @FristWord = SubString(@HZ,@i,1)12 If( @Fr... 阅读全文
摘要:
1 CREATE FUNCTION GetMaxbhInc (@bh varchar(50)) 2 RETURNS varchar(50) 3 AS 4 BEGIN 5 declare @return varchar(50),@i int,@len int,@v int,@vs varchar(10) 6 7 set @bh=isnull(@bh,'00') 8 9 set @len=len(@bh)10 11 set @i=patindex('%[0-9]%',@bh)12 if @i=0 13 b... 阅读全文