Compare Page Revisions
« Older Revision - Back to Page History - Current Revision
create function dbo.PadLeft ( @input int ,@width int ,@pad char(1) ) returns varchar as begin /* declare @input int = 10000 ,@width int = 5 ,@pad char(1) = '0' */ return REPLICATE(@pad, @width - ceiling(LOG10(@input+1))) + CONVERT(varchar(20), @input) end
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.