USP_DATALIST_NEWSCHANNEL

Returns the NewsChannel associated with a particular piece of content, personal content, or all of them.

Parameters

Parameter Parameter Type Mode Description
@SiteContentID int IN SiteContentID
@PersonalPageDataID int IN PersonalPageDataID

Definition

Copy


create procedure dbo.USP_DATALIST_NEWSCHANNEL(
    @SiteContentID int = null
    @PersonalPageDataID int = null
)

as
    set nocount on;

     select 
       guid,
       ID,
           SiteContentID,
           PersonalPageDataID
    from dbo.NewsChannels
    where 
  (@SiteContentID is null and @PersonalPageDataID is null)
  or
  (SiteContentID = @SiteContentID and @PersonalPageDataID is null)
  or 
  (@SiteContentID is null and PersonalPageDataID = @PersonalPageDataID)