UFN_CONSTITID_MAPFROM_REVENUETRIBUTEID
Maps a REVENUETRIBUTEID to a CONSTITUENTID.
Return
Return Type |
---|
uniqueidentifier |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@REVENUETRIBUTEID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_CONSTITID_MAPFROM_REVENUETRIBUTEID
(
@REVENUETRIBUTEID uniqueidentifier
)
returns uniqueidentifier
as
begin
declare @ID uniqueidentifier
select @ID = REVENUE.CONSTITUENTID
from dbo.REVENUETRIBUTE
inner join dbo.REVENUE on REVENUETRIBUTE.REVENUEID = REVENUE.ID
where REVENUETRIBUTE.ID = @REVENUETRIBUTEID
return @ID
end