Difference between revisions of "Dbo.ufnLeadingZeros (function)"
| Line 31: | Line 31: | ||
| dbo.ufnLeadingZeros | | dbo.ufnLeadingZeros | ||
|- valign="top" | |- valign="top" | ||
| − | |||
| '''Description | | '''Description | ||
| Scalar function used by the Sales.Customer table to help set the account number. | | Scalar function used by the Sales.Customer table to help set the account number. | ||
|- | |- | ||
| − | |||
|} | |} | ||
Revision as of 07:01, 30 November 2009
wikibot
| function | dbo.ufnLeadingZeros |
CREATE FUNCTION [dbo].[ufnLeadingZeros](
@Value int
)
RETURNS varchar(8)
WITH SCHEMABINDING
AS
BEGIN
DECLARE @ReturnValue varchar(8);
SET @ReturnValue = CONVERT(varchar(8), @Value);
SET @ReturnValue = REPLICATE('0', 8 - DATALENGTH(@ReturnValue)) + @ReturnValue;
RETURN (@ReturnValue);
END;
automatically generated
| function | dbo.ufnLeadingZeros |
| Description | Scalar function used by the Sales.Customer table to help set the account number. |
CREATE FUNCTION [dbo].[ufnLeadingZeros](
@Value int
)
RETURNS varchar(8)
WITH SCHEMABINDING
AS
BEGIN
DECLARE @ReturnValue varchar(8);
SET @ReturnValue = CONVERT(varchar(8), @Value);
SET @ReturnValue = REPLICATE('0', 8 - DATALENGTH(@ReturnValue)) + @ReturnValue;
RETURN (@ReturnValue);
END;