UFN_PLEDGE_GETNAMEFORPDWRITEOFFREASONCODE
Return
| Return Type |
|---|
| nvarchar(50) |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @ID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_PLEDGE_GETNAMEFORPDWRITEOFFREASONCODE(@ID uniqueidentifier) returns nvarchar(50)
as
begin
declare @s nvarchar(50);
if COALESCE(@ID,'99999999-9999-9999-9999-999999999999') = '99999999-9999-9999-9999-999999999999'
select @s = 'All reason codes'
else
select @s = NAME from dbo.WRITEOFFREASONCODES where ID = @ID
return @s;
end