Thursday, 19 October 2017

Flag Status Scaler Valued Function

CREATE FUNCTION [dbo].[GetDeleteFlagStatus]
(
@DeleteFlag INT
)
RETURNS NVARCHAR(15)
AS
BEGIN

DECLARE @Status NVARCHAR(15);
SET @Status = (CASE WHEN @DeleteFlag=0 THEN 'Active'
WHEN @DeleteFlag=1 THEN 'Suspend'
WHEN @DeleteFlag =2 THEN 'Delete'
END)
RETURN @Status
END

No comments:

Post a Comment

React Hooks - custom Hook

  v CustomHook Ø React allows us to create our own hook which is known as custom hook. Example – 1 localStorage Demo Step-1 Create ...