/*
 Navicat Premium Data Transfer

 Source Server         : sql server
 Source Server Type    : SQL Server
 Source Server Version : 15002080
 Source Host           : .:1433
 Source Catalog        : AIS20231110222743
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 15002080
 File Encoding         : 65001

 Date: 06/02/2024 11:40:17
*/


-- ----------------------------
-- Table structure for TMP123123123123123
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[TMP123123123123123]') AND type IN ('U'))
	DROP TABLE [dbo].[TMP123123123123123]
GO

CREATE TABLE [dbo].[TMP123123123123123] (
  [FIDENTITYID] bigint NOT NULL,
  [FID] int  NOT NULL,
  [FSEQ] int  NULL,
  [FENTRYID] int  NOT NULL,
  [FDATE] datetime  NULL,
  [FPLANSTARTDATE] datetime  NULL,
  [FPLANFINISHDATE] datetime  NULL,
  [FSALEORDERNO] nvarchar(80) COLLATE Chinese_PRC_CI_AS  NULL,
  [FBILLNO] nvarchar(80) COLLATE Chinese_PRC_CI_AS  NULL,
  [FQTY] decimal(23,10)  NOT NULL,
  [FYIELDRATE] decimal(19,6)  NOT NULL,
  [FROUTINGID] int  NULL,
  [PRODUCTTYPE] varchar(6) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [ProMaterialId] int  NULL,
  [PrdUnitId] int  NULL,
  [FPPBOMBILLNO] nvarchar(80) COLLATE Chinese_PRC_CI_AS  NULL,
  [FBOMENTRYID] int  NULL,
  [ProMnemoniccode] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [ProNumber] nvarchar(80) COLLATE Chinese_PRC_CI_AS  NULL,
  [ProName] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ProSpecification] nvarchar(510) COLLATE Chinese_PRC_CI_AS  NULL,
  [ProUnitName] nvarchar(80) COLLATE Chinese_PRC_CI_AS  NULL,
  [FMATERIALID] int  NULL,
  [FUnitNeedQty] decimal(38,15)  NULL,
  [FNEEDQTY] decimal(23,10)  NOT NULL,
  [FUNITID] int  NOT NULL,
  [FBASEWIPQTY] decimal(23,10)  NULL,
  [FPICKEDQTY] decimal(23,10)  NULL,
  [FNOPICKEDQTY] decimal(23,10)  NULL,
  [FSTDQTY] decimal(23,10)  NOT NULL,
  [FMUSTQTY] decimal(23,10)  NOT NULL,
  [FMEMO] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [FLossQty] decimal(38,10)  NULL,
  [FSCRAPQTY] decimal(23,10)  NULL,
  [FREPICKEDQTY] decimal(23,10)  NULL,
  [FWORKSHOPID] int  NULL,
  [FSTOCKID] int  NULL,
  [FSTOCKLOCID] int  NULL,
  [PPBOMStatus] varchar(8) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [MaterialNumber] nvarchar(80) COLLATE Chinese_PRC_CI_AS  NULL,
  [MaterialName] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [MaterialSpecification] nvarchar(510) COLLATE Chinese_PRC_CI_AS  NULL,
  [MaterialUnitName] nvarchar(80) COLLATE Chinese_PRC_CI_AS  NULL,
  [Materialsrc] varchar(3) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [WORKSHOPNAME] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [FMASTERID] int  NULL,
  [FUSEORGID] int  NULL,
  [BOMMEMO] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [FSTOCKNAME] nvarchar(80) COLLATE Chinese_PRC_CI_AS  NULL,
  [FBASEQTY] decimal(38,10)  NULL,
  [ROUTENAME] nvarchar(80) COLLATE Chinese_PRC_CI_AS  NULL,
  [FBASEINVQTY] decimal(23,10)  NULL,
  [FBASELACKQTY] decimal(23,10)  NULL,
  [FBASEONORDERQTY] decimal(23,10)  NULL,
  [StatusIs6] varchar(6) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [LOWEST6] int  NOT NULL
)
GO

ALTER TABLE [dbo].[TMP123123123123123] SET (LOCK_ESCALATION = TABLE)
GO

