2020-12-30 22:21:14 +01:00
|
|
|
IF OBJECT_ID('[dbo].[OrganizationUser_ReadByOrganizationIdEmail]') IS NOT NULL
|
2020-12-04 23:45:54 +01:00
|
|
|
BEGIN
|
2020-12-30 22:21:14 +01:00
|
|
|
DROP PROCEDURE [dbo].[OrganizationUser_ReadByOrganizationIdEmail]
|
2020-12-04 23:45:54 +01:00
|
|
|
END
|
|
|
|
GO
|
|
|
|
|
|
|
|
CREATE PROCEDURE [dbo].[OrganizationUser_ReadByOrganizationIdEmail]
|
|
|
|
@OrganizationId UNIQUEIDENTIFIER,
|
|
|
|
@Email NVARCHAR(50)
|
|
|
|
AS
|
|
|
|
BEGIN
|
|
|
|
SET NOCOUNT ON
|
|
|
|
|
|
|
|
SELECT
|
|
|
|
*
|
|
|
|
FROM
|
|
|
|
[dbo].[OrganizationUserView]
|
|
|
|
WHERE
|
|
|
|
[OrganizationId] = @OrganizationId
|
|
|
|
AND [Email] IS NOT NULL
|
|
|
|
AND @Email IS NOT NULL
|
|
|
|
AND [Email] = @Email
|
|
|
|
END
|
|
|
|
GO
|