NJC__Documentation::DB

dbo.dt_ms_memo_detail

Description

Properties

Name Value
Collation
File Group
Filestream File Group
Is Partitioned

False

Partitioned Column
Partition Scheme
File Groups
Filestream Partition Scheme
Filestream File Groups
Heap

False

Full Text Catalog
Full Text
Compression NONE
Row Count (~) 79
Created 9/11/2017 09:42:00
Last Modified 9/11/2017 09:42:03

Columns

Key Name Data Type Length Precision Scale Not Null Identity Rule Default Computed Persisted Description
ms_memo_detail_id bigint 8 19 0

True

1 - 1

False

False

ms_memo_header_id bigint 8 19 0

True

False

False

ms_item_id bigint 8 19 0

True

False

False

quantity decimal 17 38 4

False

False

False

total_price decimal 17 38 4

False

False

False

info varchar 1000 0 0

False

False

False

package_code varchar 2 0 0

False

False

False

package_qty decimal 9 18 2

False

False

False

netto_qty decimal 9 18 2

False

False

False

negara_asal varchar 2 0 0

False

False

False

create_date datetime 8 23 3

False

False

False

create_by int 4 10 0

False

False

False

modify_date datetime 8 23 3

False

False

False

modify_by int 4 10 0

False

False

False

ms_item_h_price_id bigint 8 19 0

False

False

False

ms_item_out_move_avg_id bigint 8 19 0

False

False

False

ms_date_business_id int 4 10 0

False

False

False

is_move_business_date bit 1 1 0

False

False

False

ms_date_business_id_from int 4 10 0

False

False

False

Indexes

Key Name Columns Unique Type Description
PK_dt_ms_memo_detail ms_memo_detail_id

True

Foreign Keys

Name Columns Description
FK_dt_ms_memo_detail_dt_ms_item_daily_out_move_avg ms_item_out_move_avg_id
FK_dt_ms_memo_detail_dt_ms_memo_header ms_memo_header_id

SQL Script

CREATE TABLE dbo.dt_ms_memo_detail (
  ms_memo_detail_id bigint IDENTITY,
  ms_memo_header_id bigint NOT NULL,
  ms_item_id bigint NOT NULL,
  quantity decimal(38, 4) NULL,
  total_price decimal(38, 4) NULL,
  info varchar(1000) NULL,
  package_code varchar(2) NULL,
  package_qty decimal(18, 2) NULL,
  netto_qty decimal(18, 2) NULL,
  negara_asal varchar(2) NULL,
  create_date datetime NULL,
  create_by int NULL,
  modify_date datetime NULL,
  modify_by int NULL,
  ms_item_h_price_id bigint NULL,
  ms_item_out_move_avg_id bigint NULL,
  ms_date_business_id int NULL,
  is_move_business_date bit NULL,
  ms_date_business_id_from int NULL,
  CONSTRAINT PK_dt_ms_memo_detail PRIMARY KEY CLUSTERED (ms_memo_detail_id)
)
ON [PRIMARY]
GO

ALTER TABLE dbo.dt_ms_memo_detail WITH NOCHECK
  ADD CONSTRAINT FK_dt_ms_memo_detail_dt_ms_item_daily_out_move_avg FOREIGN KEY (ms_item_out_move_avg_id) REFERENCES dbo.dt_ms_item_daily_out_move_avg (ms_item_out_move_avg_id) NOT FOR REPLICATION
GO

ALTER TABLE dbo.dt_ms_memo_detail
  NOCHECK CONSTRAINT FK_dt_ms_memo_detail_dt_ms_item_daily_out_move_avg
GO

ALTER TABLE dbo.dt_ms_memo_detail WITH NOCHECK
  ADD CONSTRAINT FK_dt_ms_memo_detail_dt_ms_memo_header FOREIGN KEY (ms_memo_header_id) REFERENCES dbo.dt_ms_memo_header (ms_memo_header_id) NOT FOR REPLICATION
GO

ALTER TABLE dbo.dt_ms_memo_detail
  NOCHECK CONSTRAINT FK_dt_ms_memo_detail_dt_ms_memo_header
GO