?? yearinit.sql
字號:
AuditFlag char(1) not null
default '0',
AuditOperator TSTAFF null ,
ReceiveDate TDATE not null
default getdate(),
BusinessFlag char(1) not null,
ReceiptFlag char(1) not null,
Remark TMEMO null ,
constraint PK_IMPORT primary key (ImportNo)
)
go
/* ============================================================ */
/* Table: ImportDetail */
/* ============================================================ */
create table ImportDetail
(
ImportNo TRECEIPT null ,
GoodsNo TGOODS not null,
Qty TQTY not null,
AuditQty TQTY null ,
NTaxPrice TPRICE not null,
TaxPrice TPRICE not null,
RetailPrice TPRICE null ,
Amt TAMT not null,
NTaxAmt TAMT not null,
ValidDate TDATE null ,
OrgImportNo TRECEIPT null ,
BatchNo TBATCH null ,
UD1 TUDF null ,
UD2 TUDF null ,
ID INT IDENTITY not null,
constraint PK_IMPORTDETAIL primary key (ID)
)
go
/* ============================================================ */
/* Table: Alloc */
/* ============================================================ */
create table Alloc
(
AllocNo TRECEIPT not null,
InputDate TDATE null
default GETDATE(),
AllocDate TDATE null ,
AuditDate TDATE null
default getdate(),
ReceiptNo TINVOICE null ,
Operator TSTAFF null ,
Employee TSTAFF null ,
DestDept TDEPT null ,
SrcDept TDEPT not null,
InputDept TDEPT not null,
Cost TAMT null ,
NTaxAmt TAMT not null,
Amt TAMT null ,
AuditFlag char(1) not null
default '0',
AuditOperator TSTAFF null ,
ReceiveDate TDATE not null
default getdate(),
BusinessFlag Char(1) not null,
ReceiptFlag char(1) not null
default '0',
Remark TMEMO null ,
constraint PK_ALLOC primary key (AllocNo)
)
go
/* ============================================================ */
/* Index: index_of_alloc_date */
/* ============================================================ */
create index index_of_alloc_date on Alloc (InputDate)
go
/* ============================================================ */
/* Index: index_of_alloc_operator */
/* ============================================================ */
create index index_of_alloc_operator on Alloc (Operator)
go
/* ============================================================ */
/* Index: index_of_alloc_destdept */
/* ============================================================ */
create index index_of_alloc_destdept on Alloc (DestDept)
go
/* ============================================================ */
/* Table: AllocDetail */
/* ============================================================ */
create table AllocDetail
(
AllocNo TRECEIPT not null,
GoodsNo TGOODS null ,
Qty TQTY not null,
AuditQty TQTY null ,
CostPrice TPRICE null ,
Price TPRICE not null,
NTaxPrice TPRICE not null,
RetailPrice TPRICE null ,
Amt TAMT not null,
NTaxAmt TAMT not null,
ValidDate TDATE null ,
VendorNo TVENDOR null ,
OrgAllocNo TRECEIPT null ,
Batchno TBatch null ,
ID INT IDENTITY not null,
ReqNo TReceipt null,
constraint PK_ALLOCDETAIL primary key (ID)
)
go
/* ============================================================ */
/* Index: index_of_allocdetail_goods */
/* ============================================================ */
create index index_of_allocdetail_goods on AllocDetail (GoodsNo)
go
/* ============================================================ */
/* Index: index_of_allocdetail_allocno */
/* ============================================================ */
create index index_of_allocdetail_allocno on AllocDetail (AllocNo)
go
/* ============================================================ */
/* Table: LossDetail */
/* ============================================================ */
create table LossDetail
(
LossNo TRECEIPT not null,
GoodsNo TGOODS not null,
LossType CHAR(1) null ,
Qty TQTY not null,
AuditQty TQTY null ,
CostPrice TPRICE null ,
RetailPrice TPRICE null ,
BatchNo TBATCH null ,
OrgLossNo TRECEIPT null ,
ID INT IDENTITY not null,
constraint PK_LOSSDETAIL primary key (ID)
)
go
/* ============================================================ */
/* Index: index_of_lossno */
/* ============================================================ */
create index index_of_lossno on LossDetail (LossNo)
go
/* ============================================================ */
/* Index: index_of_lossdetail_goodsno */
/* ============================================================ */
create index index_of_lossdetail_goodsno on LossDetail (GoodsNo)
go
/* ============================================================ */
/* Table: Sale */
/* ============================================================ */
create table Sale
(
SaleNo TRECEIPT not null,
DeptNo TDEPT not null,
InputDate TDATE not null
default GETDATE(),
ReceiveDate TDATE not null
default getdate(),
AuditDate TDATE null
default getdate(),
CustNo TVENDOR null ,
ReceiptNo TINVOICE null ,
Employee TSTAFF null ,
Operator TSTAFF null ,
Cost TAMT null ,
NTaxAmt TAMT not null,
Amt TAMT null ,
PayMode TPAYMODE null ,
AuditFlag char(1) not null
default '0',
AuditOperator TSTAFF null ,
BusinessFlag char(1) not null
default '0',
Remark TMEMO null ,
constraint PK_SALE primary key (SaleNo)
)
go
/* ============================================================ */
/* Index: index_of_sale_inputdate */
/* ============================================================ */
create index index_of_sale_inputdate on Sale (InputDate)
go
/* ============================================================ */
/* Index: index_of_sale_operator */
/* ============================================================ */
create index index_of_sale_operator on Sale (Operator)
go
/* ============================================================ */
/* Index: index_of_sale_custno */
/* ============================================================ */
create index index_of_sale_custno on Sale (CustNo)
go
/* ============================================================ */
/* Table: Loss */
/* ============================================================ */
create table Loss
(
LossNo TRECEIPT not null,
InputDate TDATE null
default GETDATE(),
LossDate TDATE null ,
AuditDate TDATE null
default getdate(),
DeptNO TDEPT not null,
ReceiptNo TINVOICE null ,
Operator TSTAFF null ,
Employee TSTAFF null ,
Amt TAMT not null,
AuditFlag char(1) not null
default '0',
AuditOperator TSTAFF null ,
ReceiveDate TDATE not null
default getdate(),
BusinessFlag Char(1) not null,
Remark TMEMO null ,
constraint PK_LOSS primary key (LossNo)
)
go
/* ============================================================ */
/* Index: index_of_loss_date */
/* ============================================================ */
create index index_of_loss_date on Loss (InputDate)
go
/* ============================================================ */
/* Index: index_of_loss_operator */
/* ============================================================ */
create index index_of_loss_operator on Loss (Operator)
go
/* ============================================================ */
/* Table: SaleDetail */
/* ============================================================ */
create table SaleDetail
(
SaleNo TRECEIPT not null,
GoodsNo TGOODS not null,
NTaxPrice TPRICE not null,
Price TPRICE not null,
RetailPrice TPRICE null ,
Qty TQTY not null,
AuditQty TQTY null ,
NTaxAmt TAMT null ,
Amt TAMT not null,
CostPrice TPRICE null ,
OrgSaleNo TRECEIPT null ,
BatchNo TBATCH null ,
ID INT IDENTITY not null,
constraint PK_SALEDETAIL primary key (ID)
)
go
/* ============================================================ */
/* Index: index_of_saledetail_goodsno */
/* ============================================================ */
create index index_of_saledetail_goodsno on SaleDetail (GoodsNo)
go
/* ============================================================ */
/* Index: index_of_saledetail_saleno */
/* ============================================================ */
create index index_of_saledetail_saleno on SaleDetail (SaleNo)
go
/* ============================================================ */
/* Table: Adjust */
/* ============================================================ */
create table Adjust
(
AdjustNo TRECEIPT not null,
InputDate TDATE null
default getdate(),
ReceiveDate TDATE not null
default getdate(),
AuditDate TDATE null
default getdate(),
InputDept TDEPT not null,
Operator TSTAFF null ,
ReceiptNo TINVOICE null ,
Employee TSTAFF null ,
AuditFlag char(1) not null
default '0',
AuditOperator TSTAFF null ,
BusinessFlag char(1) not null,
Remark TMEMO null ,
constraint PK_ADJUST primary key (AdjustNo)
)
go
/* ============================================================ */
/* Index: index_of_adjust_inputdate */
/* ============================================================ */
create index index_of_adjust_inputdate on Adjust (InputDate)
go
/* ============================================================ */
/* Index: index_of_adjust_operator */
/* ============================================================ */
create index index_of_adjust_operator on Adjust (Operator)
go
/* ============================================================ */
/* Table: AdjustDetail */
/* ============================================================ */
create table AdjustDetail
(
ID INT IDENTITY not null,
AdjustNo TRECEIPT not null,
GoodsNo TGOODS not null,
DeptNO TDEPT null ,
StartDate TDATE null ,
EndDate TDATE null ,
ORetailPrice TPRICE null ,
NRetailPrice TPRICE null ,
OMemberPrice TPRICE null ,
NMemberPrice TPRICE null ,
OSpecialFlag char(1) null ,
NSpecialFlag char(1) null ,
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -