USP_SIMPLEDATALIST_MKTSPONSORSHIPQUERYVIEW
Returns a list of all available sponsorship query views.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ROOTONLY | bit | IN | Only show root level query views? |
Definition
Copy
create procedure dbo.[USP_SIMPLEDATALIST_MKTSPONSORSHIPQUERYVIEW]
(
@ROOTONLY bit = 0
)
as
set nocount on;
if @ROOTONLY is null
set @ROOTONLY = 0;
select
[ID] as [VALUE],
[DISPLAYNAME] as [LABEL]
from
dbo.[QUERYVIEWCATALOG]
where
(0 = @ROOTONLY or [ROOTOBJECT] = @ROOTONLY)
and
QUERYVIEWSPEC.value(
'declare namespace bbafx="bb_appfx_queryview";
declare namespace c="bb_appfx_commontypes";
(bbafx:QueryViewSpec/c:MetaTags/@Sponsorship)[1]',
'char(1)') = '1'
order by
[DISPLAYNAME];