UFN_SITE_UNIQUESITEPATH
Returns true if the site path is unique.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_SITE_UNIQUESITEPATH(
@ID uniqueidentifier
)
returns bit
with execute as caller
as begin
declare @SITEPATH nvarchar(1000) = dbo.UFN_SITE_GETPATH(@ID);
if exists(
select 1
from dbo.SITE
where
SITE.ID <> @ID and
dbo.UFN_SITE_GETPATH(ID) = @SITEPATH
) begin
return 0;
end;
return 1;
end