| Property | Value |
|---|---|
| Name | ufnLeadingZeros |
| ID | 69575286 |
| Schema | dbo |
| Owner | dbo |
| Execute As | Caller |
| Type | SQL SCALAR FUNCTION |
| Uses Ansi Nulls |
|
| Uses Quoted Identifier |
|
| Is Schema Bound |
|
| Uses Database Collation |
|
| Null on Null Input |
|
| Encrypted |
|
| MS Shipped |
|
| Published |
|
| Schema Published |
|
| Deterministic |
|
| Precise |
|
| System Verified |
|
| System Data Access |
|
| User Data Access |
|
| Modify Date | 8/8/2010 5:21:43 PM |
| Creation Date | 8/8/2010 5:21:43 PM |
| Name | Value |
|---|---|
| MS_Description | Scalar function used by the Sales.Customer table to help set the account number. |
| Parameter Name | Datatype | Has Default Value | Default Value | Read Only | Xml Document | Description |
|---|---|---|---|---|---|---|
| @Value | int |
|
|
|
Input parameter for the scalar function ufnLeadingZeros. Enter a valid integer. |
| Datatype | Has Default Value | Default Value | Xml Document | Description |
|---|---|---|---|---|
| varchar(8) |
|
|
| Script |
|---|
| SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON 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; EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Input parameter for the scalar function ufnLeadingZeros. Enter a valid integer.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'FUNCTION',@level1name=N'ufnLeadingZeros', @level2type=N'PARAMETER',@level2name=N'@Value' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Scalar function used by the Sales.Customer table to help set the account number.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'FUNCTION',@level1name=N'ufnLeadingZeros' |