USP_GET_CONSENTOPTIONS_BY_CONTENTID
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ContentID | int | IN |
Definition
Copy
create procedure dbo.USP_GET_CONSENTOPTIONS_BY_CONTENTID
(
@ContentID int
)
as
select
CO.ID,
CO.CONTENTID,
CO.CAPTION ,
CO.SEQUENCE,
CO.ISREQUIRED,
CO.SOLICITCODEID,
CO.CONSENTCODE,
CO.CONSENTNAME,
CO.SITEID,
case
when CO.SITEID is null or CO.SITEID = '00000000-0000-0000-0000-000000000000' then 'All sites'
else S.NAME
END as SITENAME,
CHANNELCODE as CHANNEL
from
dbo.CONSENTOPTION as CO
left join dbo.SITE as S
on CO.SITEID = S.ID
where
CONTENTID = @ContentID
order by SEQUENCE