You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
482 B
25 lines
482 B
IF OBJECT_ID('[dbo].[OrganizationUser_ReadByUserIds]') IS NOT NULL |
|
BEGIN |
|
DROP PROCEDURE [dbo].[OrganizationUser_ReadByUserIds] |
|
END |
|
GO |
|
|
|
CREATE PROCEDURE [dbo].[OrganizationUser_ReadByUserIds] |
|
@UserIds AS [dbo].[GuidIdArray] READONLY |
|
AS |
|
BEGIN |
|
SET NOCOUNT ON |
|
|
|
IF (SELECT COUNT(1) FROM @UserIds) < 1 |
|
BEGIN |
|
RETURN(-1) |
|
END |
|
|
|
SELECT |
|
* |
|
FROM |
|
[dbo].[OrganizationUserView] |
|
WHERE |
|
[UserId] IN (SELECT [Id] FROM @UserIds) |
|
END |
|
GO
|
|
|