SCO供应链协同

## 数据表：T_SPM_PROMOTIONPOLICYEXENTRY(促销政策例外分录表)

### T_SPM_PROMOTIONPOLICYEXENTRY(促销政策例外分录表)：描述

名称 | T_SPM_PROMOTIONPOLICYEXENTRY(促销政策例外分录表)
代码 | T_SPM_PROMOTIONPOLICYEXENTRY
注释 | 促销政策例外分录表
模型 | SCO供应链协同
主键 | PK_SPM_PROMOTIONPOLICYEXENTR

### T_SPM_PROMOTIONPOLICYEXENTRY(促销政策例外分录表)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
主键ID | FENTRYID | int |  | TRUE |
促销政策ID | FID | int |  | TRUE |
行号 | FSEQ | int |  | TRUE |
物料组ID | FMATERIALGROUPID | int |  | TRUE |
物料ID | FMATERIALID | int |  | TRUE |
物料分配内码ID | FMATMASTERID | int |  | TRUE |
基本计量单位 | FBASEUNITID | int |  | TRUE |
计量单位 | FUNITID | int |  | TRUE |
辅助属性 | FAUXPROPID | int |  | TRUE |

### T_SPM_PROMOTIONPOLICYEXENTRY(促销政策例外分录表)：脚本代码

if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_SPM_PROMOTIONPOLICYEXENTRY') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PROMOTIONPOLICYEXENTRY
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONPOLICYEXENTRY')
and name = 'IDX_SPM_PROPOLICYEXE_MGID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONPOLICYEXENTRY.IDX_SPM_PROPOLICYEXE_MGID
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONPOLICYEXENTRY')
and name = 'IDX_SPM_PROPOLICYEXE_MID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONPOLICYEXENTRY.IDX_SPM_PROPOLICYEXE_MID
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONPOLICYEXENTRY')
and name = 'IDX_SPM_PROPOLICYEXE_ID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONPOLICYEXENTRY.IDX_SPM_PROPOLICYEXE_ID
go
if exists (select 1
from sysobjects
where id = object_id('T_SPM_PROMOTIONPOLICYEXENTRY')
and type = 'U')
drop table T_SPM_PROMOTIONPOLICYEXENTRY
go
/*==============================================================*/
/* Table: T_SPM_PROMOTIONPOLICYEXENTRY */
/*==============================================================*/
create table T_SPM_PROMOTIONPOLICYEXENTRY (
FENTRYID int not null default 0,
FID int not null default 0,
FSEQ int not null default 0,
FMATERIALGROUPID int not null default 0,
FMATERIALID int not null default 0,
FMATMASTERID int not null default 0,
FBASEUNITID int not null default 0,
FUNITID int not null default 0,
FAUXPROPID int not null default 0,
constraint PK_SPM_PROMOTIONPOLICYEXENTR primary key (FENTRYID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'促销政策例外分录表',
'user', @CurrentUser, 'table', 'T_SPM_PROMOTIONPOLICYEXENTRY'
go
/*==============================================================*/
/* Index: IDX_SPM_PROPOLICYEXE_ID */
/*==============================================================*/
create index IDX_SPM_PROPOLICYEXE_ID on T_SPM_PROMOTIONPOLICYEXENTRY (
FID ASC
)
go
/*==============================================================*/
/* Index: IDX_SPM_PROPOLICYEXE_MID */
/*==============================================================*/
create index IDX_SPM_PROPOLICYEXE_MID on T_SPM_PROMOTIONPOLICYEXENTRY (
FMATERIALID ASC,
FID ASC
)
go
/*==============================================================*/
/* Index: IDX_SPM_PROPOLICYEXE_MGID */
/*==============================================================*/
create index IDX_SPM_PROPOLICYEXE_MGID on T_SPM_PROMOTIONPOLICYEXENTRY (
FMATERIALGROUPID ASC,
FMATERIALID ASC,
FID ASC
)
go
alter table T_SPM_PROMOTIONPOLICYEXENTRY
add constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR foreign key (FID)
references T_SPM_PROMOTIONPOLICY (FID)
go

### T_SPM_PROMOTIONPOLICYEXENTRY(促销政策例外分录表)：键值定义

名称 | 代码 | 主要的
PK_SPM_PROMOTIONPOLICYEXENTR | PK_SPM_PROMOTIONPOLICYEXENTR | TRUE

### T_SPM_PROMOTIONPOLICYEXENTRY(促销政策例外分录表)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_SPM_PROPOLICYEXE_ID | IDX_SPM_PROPOLICYEXE_ID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONPOLICYEXENTRY(促销政策例外分录表)
IDX_SPM_PROPOLICYEXE_MID | IDX_SPM_PROPOLICYEXE_MID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONPOLICYEXENTRY(促销政策例外分录表)
IDX_SPM_PROPOLICYEXE_MGID | IDX_SPM_PROPOLICYEXE_MGID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONPOLICYEXENTRY(促销政策例外分录表)

上一页

主页

下一页