mirror of
https://github.com/bitwarden/server.git
synced 2024-11-29 13:25:17 +01:00
18 lines
446 B
MySQL
18 lines
446 B
MySQL
|
CREATE OR ALTER PROCEDURE [dbo].[ProviderUser_ReadByOrganizationIdStatus]
|
||
|
@OrganizationId UNIQUEIDENTIFIER,
|
||
|
@Status TINYINT
|
||
|
AS
|
||
|
BEGIN
|
||
|
SET NOCOUNT ON
|
||
|
|
||
|
SELECT
|
||
|
PU.*
|
||
|
FROM
|
||
|
[dbo].[ProviderUserView] PU
|
||
|
INNER JOIN [dbo].[ProviderOrganizationView] as PO
|
||
|
ON PU.[ProviderId] = PO.[ProviderId]
|
||
|
WHERE
|
||
|
PO.[OrganizationId] = @OrganizationId
|
||
|
AND (@Status IS NULL OR PU.[Status] = @Status)
|
||
|
END
|
||
|
GO
|