Function:
[AdventureWorks2016CTP3].[dbo].[ufnGetPurchaseOrderStatusText_native]
Name | Value |
Schema | [dbo] |
Owner | [dbo] |
Creation date | 23.10.2015 |
Type | Scalar |
Is schema bound | ![]() |
Is deterministic | |
Encrypted | |
Implementation type | Transact SQL |
ID | 1716201164 |
Name | Value |
QUOTED_IDENTIFIER | ON |
ANSI_NULLS | ON |
Name | Description | DataType | Max length | ReadOnly |
@Status | tinyint | 1 |
Name | Datatype | Max length |
@Return | nvarchar | 15 |
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION dbo.ufnGetPurchaseOrderStatusText_native (@Status tinyint) RETURNS nvarchar(15) WITH NATIVE_COMPILATION, SCHEMABINDING AS BEGIN ATOMIC WITH (TRANSACTION ISOLATION LEVEL = SNAPSHOT, LANGUAGE = N'English') IF @Status=1 RETURN 'Pending' IF @Status=2 RETURN 'Approved' IF @Status=3 RETURN 'Rejected' IF @Status=4 RETURN 'Complete' RETURN '** Invalid **' END GO |