USP_OLAPATTRIBUTECATEGORYSELECTION_EDIT

The save procedure used by the edit dataform template "OLAP attribute category selection data form".

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter indicating the ID of the record being edited.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the procedure.
@ELIGIBLEATTRIBUTECATEGORIES xml IN Eligible attribute categories
@SELECTEDATTRIBUTECATEGORIES xml IN Selected attribute categories

Definition

Copy


CREATE procedure dbo.[USP_OLAPATTRIBUTECATEGORYSELECTION_EDIT]
(
  @ID uniqueidentifier,
  @CHANGEAGENTID uniqueidentifier = null,
  @ELIGIBLEATTRIBUTECATEGORIES xml,
  @SELECTEDATTRIBUTECATEGORIES xml
)
as
  set nocount on;

  if @CHANGEAGENTID is null
    exec dbo.[USP_CHANGEAGENT_GETORCREATECHANGEAGENT] @CHANGEAGENTID output;

  declare @CURRENTDATE datetime;
  set @CURRENTDATE = getdate();

  exec dbo.[USP_OLAP_GETEXISTINGOLAPATTRIBUTECATEGORIES_UPDATEFROMXML] @ID, @SELECTEDATTRIBUTECATEGORIES, @CHANGEAGENTID, @CURRENTDATE;

  exec dbo.[USP_OLAPATTRIBUTECATEGORYSELECTION_CREATEETLDELETEDID];

return 0;