The core infrastructure backend (API, database, Docker, etc).
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.
 
 
 
 
 
 

17 lines
435 B

CREATE OR ALTER PROCEDURE [dbo].[Organization_ReadOwnerEmailAddressesById]
@OrganizationId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
[U].[Email]
FROM [User] AS [U]
INNER JOIN [OrganizationUser] AS [OU] ON [U].[Id] = [OU].[UserId]
WHERE
[OU].[OrganizationId] = @OrganizationId AND
[OU].[Type] = 0 AND -- Owner
[OU].[Status] = 2 -- Confirmed
GROUP BY [U].[Email]
END
GO