SCO供应链协同

## 数据表：T_SPM_PROMOTIONPRAISECUST(促销结案报告客户范围表)

### T_SPM_PROMOTIONPRAISECUST(促销结案报告客户范围表)：描述

名称 | T_SPM_PROMOTIONPRAISECUST(促销结案报告客户范围表)
代码 | T_SPM_PROMOTIONPRAISECUST
注释 | T_SPM_PromotionPraiseCust
模型 | SCO供应链协同
主键 | PK_SPM_PROMOTIONPRAISECUST_E

### T_SPM_PROMOTIONPRAISECUST(促销结案报告客户范围表)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
促销结案ID | FID | int |  | TRUE |
分录内码 | FENTRYID | int |  | TRUE |
序号 | FSEQ | int |  | TRUE |
客户 | FCUSTOMERID | int |  | TRUE |
客户类别 | FCUSTOMERTYPEID | varchar(36) | 36 | TRUE |
客户分配内码 | FCUSTMASTERID | int |  | TRUE |

### T_SPM_PROMOTIONPRAISECUST(促销结案报告客户范围表)：脚本代码

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_PROMOTIONPRAISECUST') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PROMOTIONPRAISECUST
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONPRAISECUST')
and name = 'IDX_SPM_PROMOTIONPRAISEC_ID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONPRAISECUST.IDX_SPM_PROMOTIONPRAISEC_ID
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONPRAISECUST')
and name = 'IDX_SPM_PROMOTIONPRAISEC_CID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONPRAISECUST.IDX_SPM_PROMOTIONPRAISEC_CID
go
if exists (select 1
from sysobjects
where id = object_id('T_SPM_PROMOTIONPRAISECUST')
and type = 'U')
drop table T_SPM_PROMOTIONPRAISECUST
go
/*==============================================================*/
/* Table: T_SPM_PROMOTIONPRAISECUST */
/*==============================================================*/
create table T_SPM_PROMOTIONPRAISECUST (
FID int not null default 0,
FENTRYID int not null default 0,
FSEQ int not null default 0,
FCUSTOMERID int not null default 0,
FCUSTOMERTYPEID varchar(36) not null default '',
FCUSTMASTERID int not null default 0,
constraint PK_SPM_PROMOTIONPRAISECUST_E primary key (FENTRYID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'T_SPM_PromotionPraiseCust',
'user', @CurrentUser, 'table', 'T_SPM_PROMOTIONPRAISECUST'
go
/*==============================================================*/
/* Index: IDX_SPM_PROMOTIONPRAISEC_CID */
/*==============================================================*/
create index IDX_SPM_PROMOTIONPRAISEC_CID on T_SPM_PROMOTIONPRAISECUST (
FCUSTMASTERID ASC,
FCUSTOMERTYPEID ASC,
FID ASC
)
go
/*==============================================================*/
/* Index: IDX_SPM_PROMOTIONPRAISEC_ID */
/*==============================================================*/
create index IDX_SPM_PROMOTIONPRAISEC_ID on T_SPM_PROMOTIONPRAISECUST (
FID ASC
)
go
alter table T_SPM_PROMOTIONPRAISECUST
add constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR foreign key (FID)
references T_SPM_PROMOTIONAPPRAISE (FID)
go

### T_SPM_PROMOTIONPRAISECUST(促销结案报告客户范围表)：键值定义

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

### T_SPM_PROMOTIONPRAISECUST(促销结案报告客户范围表)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_SPM_PROMOTIONPRAISEC_CID | IDX_SPM_PROMOTIONPRAISEC_CID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONPRAISECUST(促销结案报告客户范围表)
IDX_SPM_PROMOTIONPRAISEC_ID | IDX_SPM_PROMOTIONPRAISEC_ID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONPRAISECUST(促销结案报告客户范围表)

上一页

主页

下一页