Advertisement
aadddrr

tr_sales_gross_profit_by_ctgr_product

Aug 25th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE SEQUENCE tr_sales_gross_profit_by_ctgr_product_seq
  2.  INCREMENT 1
  3.  MINVALUE 1
  4.  MAXVALUE 9223372036854775807
  5.  START 10
  6.  CACHE 1;
  7.  
  8. CREATE TABLE tr_sales_gross_profit_by_ctgr_product
  9. (
  10.     sales_gross_profit_by_ctgr_product_id bigint NOT NULL DEFAULT nextval('tr_sales_gross_profit_by_ctgr_product_seq'),
  11.     session_id character varying(50),
  12.     tenant_id bigint,
  13.     ou_id bigint,
  14.     year_month_date character varying(6),
  15.     partner_id bigint,
  16.     partner_code character varying(50),
  17.     partner_name character varying(100),
  18.     ctgr_product_id bigint,
  19.     ctgr_product_code character varying(50),
  20.     ctgr_product_name character varying(100),
  21.     doc_type_id bigint,
  22.     doc_no character varying(30),
  23.     doc_date character varying(8),
  24.     product_id bigint,
  25.     curr_code character varying(5),
  26.     qty numeric,
  27.     nett_sell_price numeric,
  28.     nett_amount_item numeric,
  29.     monthly_price_curr_code character varying(5),
  30.     monthly_price_amount numeric,
  31.     flg_use_receive_goods character varying(1) DEFAULT 'N',
  32.     CONSTRAINT tr_sales_gross_profit_by_ctgr_product_pkey PRIMARY KEY (sales_gross_profit_by_ctgr_product_id)
  33. )
  34. WITH(
  35.     OIDS=FALSE
  36. );
  37.  
  38. CREATE INDEX idx_tr_sales_gross_profit_by_ctgr_product_01
  39.   ON tr_sales_gross_profit_by_ctgr_product
  40.   USING btree
  41.   (session_id, tenant_id, year_month_date, ou_id, partner_id, ctgr_product_id);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement