1 PadLeft 即:向已知字符串左边补充字符,使整个字符串到达指定长度 CREATE FUNCTION PadLeft ( ),/*原始字符*/ @TotalLength int,/*总长度*/ )/*占位符*/ ) ) AS BEGIN ), @PadLen int SET @VarNew=@VarOrgan SET @PadLen=@TotalLength-LEN(@VarOrgan) ) begin select @VarNew=@Placeholder+@VarNew end ret…
1.PadLeft函数向已知字符串左边补充字符,使整个字符串到达指定长度 CREATE FUNCTION PadLeft ( ),/*原始字符*/ @TotalLength int,/*总长度*/ )/*占位符*/ ) ) AS BEGIN ), @PadLen int SET @VarNew=@VarOrgan SET @PadLen=@TotalLength-LEN(@VarOrgan) ) begin select @VarNew=@Placeholder+@VarNew end retu…