22 lines
436 B
Plaintext
22 lines
436 B
Plaintext
|
|
|
||
|
|
CREATE FUNCTION [dbo].[foo_GetIdenticalGroupChannelSettingsCount]
|
||
|
|
(
|
||
|
|
@ChannelId1 BIGINT,
|
||
|
|
@ChannelId2 BIGINT
|
||
|
|
)
|
||
|
|
RETURNS int
|
||
|
|
AS
|
||
|
|
BEGIN
|
||
|
|
return (
|
||
|
|
SELECT COUNT(*)
|
||
|
|
FROM [DataPro].[dbo].[GroupChannelSettings] G1,
|
||
|
|
[DataPro].[dbo].[GroupChannelSettings] G2
|
||
|
|
WHERE G1.ChannelId = @ChannelId1
|
||
|
|
AND G2.ChannelId = @ChannelId2
|
||
|
|
AND G1.SettingId = G2.SettingId
|
||
|
|
AND G1.SettingValue = G2.SettingValue
|
||
|
|
)
|
||
|
|
END
|
||
|
|
|
||
|
|
|