USP_DATALIST_PDCOMPOSITESEGMENT

Returns a list of Composite Segments.

Definition

Copy


CREATE procedure dbo.USP_DATALIST_PDCOMPOSITESEGMENT

as
    set nocount on;

    select 
        ID,
        NAME,
        case when exists(select * from PDACCOUNTSTRUCTURE where PDCOMPOSITESEGMENT.ID = PDACCOUNTSTRUCTURE.PDACCOUNTTABLESAVAILABLEFORSEGMENTID) then 1 else 0 end  INUSE,
        (select DBO.UFN_PDCOMPOSITESEGMENT_TABLENAMESTRING (PDCOMPOSITESEGMENT.ID,0)) TABLENAMES 
    from dbo.PDCOMPOSITESEGMENT