USP_DATALIST_MKTMARKETINGPLANSPECS

Displays a list of the marketing plan specifications.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the context ID for the data list.
@SECTIONID uniqueidentifier IN Section

Definition

Copy


CREATE procedure dbo.[USP_DATALIST_MKTMARKETINGPLANSPECS]
(
  @ID uniqueidentifier,
  @SECTIONID uniqueidentifier = null
)
as
  set nocount on;

  select
    M.[ID] ID,
    C.[DESCRIPTION] as [SECTION],
    M.[TITLE],
    M.[NOTES]
  from dbo.[MKTMARKETINGPLANITEMSPEC] M
  left join dbo.[MKTPLANITEMSPECCODE] C on [C].[ID] = [M].[PLANITEMSPECCODEID]
  where M.[MARKETINGPLANITEMID] = @ID
    and (@SECTIONID is null or C.[ID] = @SECTIONID);

  return 0;