SCO供应链协同

## 数据表：T_SPM_PROMOTIONAPPLYENTRY(促销申请分录表)

### T_SPM_PROMOTIONAPPLYENTRY(促销申请分录表)：描述

名称 | T_SPM_PROMOTIONAPPLYENTRY(促销申请分录表)
代码 | T_SPM_PROMOTIONAPPLYENTRY
注释 | 促销申请分录表
模型 | SCO供应链协同
主键 | PK_SPM_PROMOTIONAPPLYENTRY

### T_SPM_PROMOTIONAPPLYENTRY(促销申请分录表)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
分录内码 | FENTRYID | int |  | TRUE |
单据ID | FID | int |  | TRUE |
分录序号 | FSEQ | int |  | FALSE |
促销费用项目 | FPROMOTIONPROJECTID | int |  | TRUE |
促销类型 | FPROMOTIONPROJECTGROUPID | int |  | TRUE |
数量 | FQTY | decimal(23,10) | 23 | TRUE |

### T_SPM_PROMOTIONAPPLYENTRY(促销申请分录表)：脚本代码

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_PROMOTIONAPPLYENTRY') and o.name = 'FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR')
alter table T_SPM_PROMOTIONAPPLYENTRY
drop constraint FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR
go
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_PROMOTIONAPPLYENTRY_L') and o.name = 'FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR')
alter table T_SPM_PROMOTIONAPPLYENTRY_L
drop constraint FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONAPPLYENTRY')
and name = 'IDX_SPM_PROMOAPPENTRY_FID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONAPPLYENTRY.IDX_SPM_PROMOAPPENTRY_FID
go
if exists (select 1
from sysobjects
where id = object_id('T_SPM_PROMOTIONAPPLYENTRY')
and type = 'U')
drop table T_SPM_PROMOTIONAPPLYENTRY
go
/*==============================================================*/
/* Table: T_SPM_PROMOTIONAPPLYENTRY */
/*==============================================================*/
create table T_SPM_PROMOTIONAPPLYENTRY (
FENTRYID int not null default 0,
FID int not null default 0,
FSEQ int null default 0,
FPROMOTIONPROJECTID int not null default 0,
FPROMOTIONPROJECTGROUPID int not null default 0,
FQTY decimal(23,10) not null default 0,
constraint PK_SPM_PROMOTIONAPPLYENTRY primary key (FENTRYID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'促销申请分录表',
'user', @CurrentUser, 'table', 'T_SPM_PROMOTIONAPPLYENTRY'
go
/*==============================================================*/
/* Index: IDX_SPM_PROMOAPPENTRY_FID */
/*==============================================================*/
create index IDX_SPM_PROMOAPPENTRY_FID on T_SPM_PROMOTIONAPPLYENTRY (
FID ASC
)
go
alter table T_SPM_PROMOTIONAPPLYENTRY
add constraint FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR foreign key (FID)
references T_SPM_PROMOTIONAPPLY (FID)
go

### T_SPM_PROMOTIONAPPLYENTRY(促销申请分录表)：键值定义

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

### T_SPM_PROMOTIONAPPLYENTRY(促销申请分录表)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_SPM_PROMOAPPENTRY_FID | IDX_SPM_PROMOAPPENTRY_FID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONAPPLYENTRY(促销申请分录表)

上一页

主页

下一页