UFN_EDUCATIONALSUBDEPARTMENTCODEEXTENSION_VALIDSHORTCODE
Determines whether the short code for the educational sub department code table entry is valid.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | |
@SHORTCODE | nvarchar(25) | IN |
Definition
Copy
create function dbo.UFN_EDUCATIONALSUBDEPARTMENTCODEEXTENSION_VALIDSHORTCODE
(
@ID uniqueidentifier,
@SHORTCODE nvarchar(25)
)
returns bit
as begin
declare @valid bit
set @valid = 1;
if exists (select 1 from dbo.EDUCATIONALSUBDEPARTMENTCODEEXTENSION where ID <> @ID and SHORTCODE = @SHORTCODE)
set @valid = 0;
return @valid
end