USP_SIMPLEDATALIST_PDACCOUNTSTRUCTURE
Returns a list of all segment tables.
Definition
Copy
CREATE procedure dbo.USP_SIMPLEDATALIST_PDACCOUNTSTRUCTURE as
select distinct t1.ID as VALUE, t1.FRIENDLYTABLENAME as LABEL
from dbo.PDACCOUNTTABLESAVAILABLEFORSEGMENT t1 left join dbo.PDACCOUNTTABLESAVAILABLEFORSEGMENTPRODUCTFLAG t2 on t1.ID = t2.PDACCOUNTTABLESAVAILABLEFORSEGMENTID
left join dbo.INSTALLEDPRODUCTLIST t3 on t2.PRODUCTFLAGID = t3.ID
where (t2.ID is null
or t3.ID is not null)
--and t1.ID not in (select PDACCOUNTTABLESAVAILABLEFORSEGMENTID from dbo.PDACCOUNTSTRUCTURE
--where PDACCOUNTSYSTEMID='4B121C2C-CCE6-440D-894C-EA0DEF80D50B')
order by FRIENDLYTABLENAME