UFN_SPONSORSHIPCANCELLATIONREPORTTENURE_GETNAME
Return the description of a tenure code for the cancellation report.
Return
| Return Type |
|---|
| nvarchar(50) |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @ID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_SPONSORSHIPCANCELLATIONREPORTTENURE_GETNAME(
@ID uniqueidentifier
)
returns nvarchar(50)
with execute as caller
as begin
declare @RETVAL nvarchar(50) = 'Not Defined'
-- if @ID is not null
select @RETVAL = DESCRIPTION from dbo.SPONSORSHIPCANCELLATIONREPORTTENURECODE where ID= @ID
-- else
-- select top 1 @RETVAL = DESCRIPTION from dbo.SPONSORSHIPCANCELLATIONREPORTTENURECODE where dbo.UFN_SPONSORSHIPCANCELLATIONREPORT_CHECKTENURE(ID,@SPONSORSHIPID,@ENDDATE)=1
return @RETVAL
end