UFN_CHARITYCLAIMREFERENCENUMBER_SAMESITELESSNESS
Deprecated. Returns true if all entries in the charity claim reference number table with the same reference number either have all sites or all don't have sites.
Return
| Return Type |
|---|
| bit |
Definition
Copy
CREATE function dbo.UFN_CHARITYCLAIMREFERENCENUMBER_SAMESITELESSNESS()
returns bit
with execute as caller
as begin
-- Function is deprecated
/*declare @COUNT int;
select @COUNT = max(PAIRCOUNT) from
(select count(REFERENCENUMBER) PAIRCOUNT from
(select distinct REFERENCENUMBER, case when SITEID is null then 0 else 1 end SITELESSNESS from dbo.CHARITYCLAIMREFERENCENUMBER group by REFERENCENUMBER, case when SITEID is null then 0 else 1 end) PAIRS
group by REFERENCENUMBER) PAIRCOUNTS
if @COUNT > 1
return 0;*/
return 1;
end