EA7_spGetExistingBOLinks
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@BORecid | int | IN |
Definition
Copy
CREATE PROCEDURE dbo.EA7_spGetExistingBOLinks(@BORecid integer)
AS BEGIN
SELECT b.id AS 'LinkId', a.username, c.backofficesystemid, c.backofficerecordid, a.datelastlogin
FROM dbo.clientusers a
inner join dbo.backofficesystemusers b on b.clientusersid = a.id
inner join dbo.backofficesystempeople c on c.id = b.backofficepeopleid
where b.[current] = 1 and (a.deleted = 0) AND c.backofficerecordid = @BOrecid
order by c.backofficesystemid desc
END