CREATE TABLE fast_inputs (
	tenant_no INTEGER NOT NULL
	,company_no INTEGER NOT NULL
	,department_no INTEGER NOT NULL
	,market_no INTEGER NOT NULL
	,fast_input_cd VARCHAR(50) NOT NULL
	,fast_input_nm VARCHAR(200)
	,fast_input_type INTEGER
	,fast_input_percent DECIMAL(20, 3)
	,fast_input_price DECIMAL(20, 3)
	,simple_acct_cd VARCHAR(50)
	,PRIMARY KEY (
		tenant_no
		,company_no
		,department_no
		,market_no
		,fast_input_cd
		)
	);

INSERT INTO fast_inputs (
	tenant_no
	,company_no
	,department_no
	,market_no
	,fast_input_cd
	,fast_input_nm
	,fast_input_type
	,fast_input_percent
	,fast_input_price
	,simple_acct_cd
	)
SELECT tenant_no
	,1
	,1
	,1
	,fast_input_cd
	,fast_input_nm
	,fast_input_type
	,fast_input_percent
	,fast_input_price
	,simple_acct_cd
FROM fast_input;

CREATE TABLE stock_revision_types (
	tenant_no INTEGER NOT NULL
	,company_no INTEGER NOT NULL
	,department_no INTEGER NOT NULL
	,stock_revision_type_no INTEGER NOT NULL
	,stock_revision_type_nm VARCHAR(200)
	,PRIMARY KEY (
		tenant_no
		,company_no
		,department_no
		,stock_revision_type_no
		)
	);

INSERT INTO stock_revision_types (
	tenant_no
	,company_no
	,department_no
	,stock_revision_type_no
	,stock_revision_type_nm
	)
SELECT tenant_no
	,1
	,1
	,stock_revision_type_no
	,stock_revision_type_nm
FROM stock_revision_type;


