USP_DATALIST_SIMPLEDATALISTOTHERREFERENCES
Displays information about features that use the given simple data list.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@SIMPLEDATALISTID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_SIMPLEDATALISTOTHERREFERENCES
(
@SIMPLEDATALISTID uniqueidentifier
)
as
set nocount on;
-- build a temp table containing the results
declare @t table
(
ITEMTYPE integer,
ITEMID uniqueidentifier,
NAME nvarchar(max),
DESCRIPTION nvarchar(max)
);
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 32, ID, NAME, DESCRIPTION
from dbo.BATCHTYPEEXTENSIONCATALOG
cross apply SPECXML.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 22, ID, NAME, DESCRIPTION
from dbo.BUSINESSPROCESSCATALOG
cross apply BUSINESSPROCESSSPECXML.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 31, ID, DISPLAYNAME, DESCRIPTION
from dbo.CONFIGURATIONDATACATALOG
cross apply CONFIGURATIONDATASPECXML.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 2, ID, UINAME, DESCRIPTION
from dbo.DATALISTCATALOG
cross apply DATALISTSPEC.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 24, ID, NAME, DESCRIPTION
from dbo.DASHBOARDCATALOG
cross apply SPECXML.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 28, ID, DISPLAYNAME, DESCRIPTION
from dbo.GLOBALCHANGECATALOG
cross apply GLOBALCHANGESPECXML.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 25, ID, NAME, DESCRIPTION
from dbo.KPICATALOG
cross apply SPECXML.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 26, ID, NAME, DESCRIPTION
from dbo.MERGETASKCATALOG
cross apply SPECXML.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 7, ID, DISPLAYNAME, DESCRIPTION
from dbo.QUERYVIEWCATALOG
cross apply QUERYVIEWSPEC.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 9, ID, UINAME, DESCRIPTION
from dbo.REPORTCATALOG
cross apply REPORTSPECXML.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 10, ID, UINAME, DESCRIPTION
from dbo.SEARCHLISTCATALOG
cross apply SEARCHLISTSPEC.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 11, ID, UINAME, DESCRIPTION
from dbo.SIMPLEDATALISTCATALOG
cross apply SIMPLEDATALISTSPECXML.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 27, ID, DISPLAYNAME, DESCRIPTION
from dbo.SMARTFIELDCATALOG
cross apply SMARTFIELDSPECXML.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 12, ID, UINAME, DESCRIPTION
from dbo.SMARTQUERYCATALOG
cross apply SMARTQUERYSPEC.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
with xmlnamespaces ('bb_appfx_commontypes' as common)
insert into @t
select 18, ID, NAME, DESCRIPTION
from dbo.TRANSLATIONFUNCTIONCATALOG
cross apply TRANSLATIONFUNCTIONSPEC.nodes('//common:SimpleDataList') as feature(simpledatalists)
where feature.simpledatalists.value('@SimpleDataListID', 'uniqueidentifier') = @SIMPLEDATALISTID;
-- now build the results
select distinct
ITEMTYPE,
case ITEMTYPE
when 2 then 'Data list'
when 7 then 'Query view'
when 9 then 'Report'
when 10 then 'Search list'
when 11 then 'Simple data list'
when 12 then 'Smart query'
when 18 then 'Translation function'
when 22 then 'Business process'
when 24 then 'Dashboard'
when 25 then 'KPI'
when 26 then 'Merge task'
when 27 then 'Smart field'
when 28 then 'Global change'
when 31 then 'Configuration data'
when 32 then 'Batch type extension'
end as ITEMTYPENAME,
ITEMID,
NAME,
DESCRIPTION,
case ITEMTYPE
when 2 then 'res:datalistspec'
when 7 then 'res:queryviewspec'
when 9 then 'res:reportspec'
when 10 then 'res:searchlistspec'
when 11 then 'res:simpledatalistspec'
when 12 then 'res:smartqueryspec'
when 18 then 'res:translationfunctionspec'
when 22 then 'res:businessprocessspec'
when 24 then 'res:flashdashspec'
when 25 then 'res:kpispec'
when 26 then 'res:mergetaskspec'
when 27 then 'res:smartfieldspec'
when 28 then 'res:globalchangespec'
when 31 then 'res:configurationdataspec'
when 32 then 'res:batchtypeextensionspec'
end as IMAGEKEY
from @t as T