mirror of
https://github.com/bitwarden/server.git
synced 2024-12-25 17:27:45 +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
|