USP_MKTSEGMENTLIST_ADD_LOAD
Loads the values for the segment list add.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CURRENTAPPUSERID | uniqueidentifier | IN | |
@LISTID | uniqueidentifier | INOUT | |
@BASECURRENCYID | uniqueidentifier | INOUT | |
@SITEID | uniqueidentifier | INOUT | |
@SITEREQUIRED | bit | INOUT | |
@SEGMENTPARTDEFINITIONID | uniqueidentifier | INOUT |
Definition
Copy
CREATE procedure dbo.[USP_MKTSEGMENTLIST_ADD_LOAD]
(
@CURRENTAPPUSERID uniqueidentifier,
@LISTID uniqueidentifier = null output,
@BASECURRENCYID uniqueidentifier = null output,
@SITEID uniqueidentifier = null output,
@SITEREQUIRED bit = null output,
@SEGMENTPARTDEFINITIONID uniqueidentifier = null output
)
as
set nocount on;
if not @LISTID is null
select
@BASECURRENCYID = isnull([BASECURRENCYID], dbo.[UFN_APPUSER_GETBASECURRENCY](@CURRENTAPPUSERID)),
@SITEID = [MKTLIST].[SITEID]
from dbo.[MKTLIST] where [ID] = @LISTID;
else
begin
set @BASECURRENCYID = dbo.[UFN_APPUSER_GETBASECURRENCY](@CURRENTAPPUSERID);
set @SITEID = dbo.[UFN_APPUSER_DEFAULTSITEFORUSER](@CURRENTAPPUSERID);
end
set @SITEREQUIRED = dbo.[UFN_SITEREQUIREDFORUSERONFEATURE](@CURRENTAPPUSERID, '9BC43439-F017-44BE-B1EF-63958A534A85', 1);
select @SEGMENTPARTDEFINITIONID = [ID] from dbo.[MKTSOURCECODEPARTDEFINITION] where [ITEMTYPECODE] = 1;
return 0;