Database Reference
In-Depth Information
— set @ViewLabel = @ViewLabel+SUBSTRING(@BreakedLabel,
@Counter,1)
SET @Counter = @Counter + 1
END
set @NewLabel = dbo.GetlBCLabe(@NumericLabel)
return @NewLabel
END
GO
create FUNCTION [dbo].[BreaklLabe](@label int)
RETURNS nvarchar(10)
AS
BEGIN
declare @NewLabel nvarchar(10)
declare @ULabel int
declare @CLabel int
declare @SLabel int
declare @TLabel int
set @ULabel = @label% 4
set @label = @label/4
set @CLabel = @label% 4
set @label = @label/4
set @SLabel = @label% 4
set @label = @label/4
set @TLabel = @label% 4
set @NewLabel = Cast(@ULabel As nvarchar(1))
+Cast(@CLabel As nvarchar(1)) +Cast(@SLabel As
nvarchar(1))+Cast(@TLabel As nvarchar(1))
return @NewLabel
END
GO
The source code of the view for each model of the multilevel rela-
tional database models is described as follows:
CREATE VIEW [dbo].[vwVisibleLabels]
AS
SELECT ID, Label
FROM tblUniqueLabel WITH (NOLOCK)
WHERE
ID IN— Classification
(SELECT KeyMappingID FROM
tblUniqueLabelMarking WITH (NOLOCK)
WHERE CategoryID = 1 AND
IS_MEMBER(MarkingRoleName) = 1)
Search WWH ::




Custom Search