UFN_RECEIPTSTACKINFO_SHORTNAME_ISUNIQUEALLOWBLANK
Checks if SHORTNAME in RECEIPTSTACKINFO table is truly unique
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | |
@SHORTNAME | nvarchar(10) | IN |
Definition
Copy
create function dbo.UFN_RECEIPTSTACKINFO_SHORTNAME_ISUNIQUEALLOWBLANK(@ID as uniqueidentifier, @SHORTNAME nvarchar(10))
returns bit
with execute as caller
as begin
if exists(select ID from RECEIPTSTACKINFO where shortname = @SHORTNAME and @ID <> ID)
return 1;
return 0;
end